forked from github/dataease
feat:增加组件的悬浮工具入口
This commit is contained in:
parent
cbf8c94fc7
commit
e4e0eef948
70
frontend/src/components/canvas/components/Editor/EditBar.vue
Normal file
70
frontend/src/components/canvas/components/Editor/EditBar.vue
Normal 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>
|
Loading…
Reference in New Issue
Block a user