forked from github/dataease
refactor(仪表板): 富文本编辑区和拖拽区优化
This commit is contained in:
parent
1b34e366dd
commit
906dffcabf
@ -36,6 +36,7 @@ import 'tinymce/plugins/directionality'
|
||||
import 'tinymce/plugins/nonbreaking'
|
||||
import 'tinymce/plugins/pagebreak'
|
||||
import { mapState } from 'vuex'
|
||||
import Vue from 'vue'
|
||||
|
||||
export default {
|
||||
name: 'DeRichText',
|
||||
@ -155,7 +156,7 @@ export default {
|
||||
setEdit() {
|
||||
if (this.editStatus) {
|
||||
this.canEdit = true
|
||||
this.element.editing = true
|
||||
Vue.set(this.element, 'editing', true)
|
||||
this.reShow()
|
||||
}
|
||||
},
|
||||
|
@ -74,18 +74,22 @@
|
||||
class="main-background"
|
||||
>
|
||||
<div
|
||||
v-show="!this.element.editing"
|
||||
class="de-drag-area de-drag-top"
|
||||
@mousedown="elementMouseDown"
|
||||
/>
|
||||
<div
|
||||
v-show="!this.element.editing"
|
||||
class="de-drag-area de-drag-right"
|
||||
@mousedown="elementMouseDown"
|
||||
/>
|
||||
<div
|
||||
v-show="!this.element.editing"
|
||||
class="de-drag-area de-drag-bottom"
|
||||
@mousedown="elementMouseDown"
|
||||
/>
|
||||
<div
|
||||
v-show="!this.element.editing"
|
||||
class="de-drag-area de-drag-left"
|
||||
@mousedown="elementMouseDown"
|
||||
/>
|
||||
|
@ -198,6 +198,9 @@ const data = {
|
||||
},
|
||||
|
||||
setCurComponent(state, { component, index }) {
|
||||
if (!component && state.curComponent) {
|
||||
Vue.set(state.curComponent, 'editing', false)
|
||||
}
|
||||
// 当前视图操作状态置空
|
||||
if (component) {
|
||||
component['optStatus'] = {
|
||||
@ -206,9 +209,9 @@ const data = {
|
||||
}
|
||||
// Is the current component in editing status
|
||||
if (!state.curComponent) {
|
||||
component['editing'] = false
|
||||
Vue.set(component, 'editing', false)
|
||||
} else if (component.id !== state.curComponent.id) {
|
||||
component['editing'] = false
|
||||
Vue.set(component, 'editing', false)
|
||||
}
|
||||
}
|
||||
state.styleChangeTimes = 0
|
||||
|
Loading…
Reference in New Issue
Block a user