feat:增加组件的悬浮工具入口

This commit is contained in:
wangjiahao 2021-08-03 11:28:12 +08:00
parent cbf8c94fc7
commit e4e0eef948

View File

@ -0,0 +1,70 @@
<template>
<div class="bar-main">
<i v-if="curComponent.type==='view'" class="icon iconfont icon-fangda" @click.stop="showViewDetails" />
<i v-if="activeModel==='edit'" class="icon iconfont icon-shezhi" @click.stop="showViewDetails" />
</div>
</template>
<script>
import { mapState } from 'vuex'
import eventBus from '@/components/canvas/utils/eventBus'
export default {
props: {
active: {
type: Boolean,
required: false,
default: false
},
// preview edit
activeModel: {
type: String,
required: false,
default: 'preview'
}
},
data() {
return {
componentType: null,
editFilter: [
'view',
'custom'
]
}
},
computed: mapState([
'menuTop',
'menuLeft',
'menuShow',
'curComponent',
'componentData',
'canvasStyleData'
]),
methods: {
showViewDetails() {
eventBus.$emit('showViewDetails')
}
}
}
</script>
<style lang="scss" scoped>
.bar-main{
position: absolute;
right: 0px;
float:right;
z-index: 2;
border-radius:2px;
padding-left: 5px;
padding-right: 2px;
cursor:pointer!important;
background-color: #0a7be0;
}
.bar-main i{
color: white;
float: right;
margin-right: 3px;
}
</style>