提交 486fd0f6 authored 作者: wangjiahao's avatar wangjiahao

feat:仪表板视图拖拽阴影跟随

上级 e35bb5c6
......@@ -510,11 +510,13 @@ export default {
width: this.computedMainSlotWidth,
height: this.computedMainSlotHeight
}
console.log('style=>' + JSON.stringify(style))
// console.log('style=>' + JSON.stringify(style))
return style
},
curComponent() {
return this.$store.state.curComponent
},
...mapState([
'curComponent',
'editor',
'curCanvasScale',
'canvasStyleData',
......@@ -614,6 +616,18 @@ export default {
this.beforeDestroyFunction()
this.createdFunction()
this.mountedFunction()
},
// private 监控dragging resizing
dragging(val) {
if (this.enabled) {
this.curComponent.optStatus.dragging = val
}
},
// private 监控dragging resizing
resizing(val) {
if (this.enabled) {
this.curComponent.optStatus.resizing = val
}
}
},
created: function() {
......@@ -1572,10 +1586,6 @@ export default {
addEvent(document.documentElement, 'touchend touchcancel', this.deselect)
// 窗口变化时,检查容器大小
addEvent(window, 'resize', this.checkParentSize)
// private 记录当前组件的操作状态
this.curComponent.optStatus.resizing = this.resizing
this.curComponent.optStatus.dragging = this.dragging
},
createdFunction() {
// minWidth不能大于maxWidth
......
......@@ -28,7 +28,7 @@ export default {
background: 'gray',
position: 'absolute'
}
console.log('style=>' + JSON.stringify(style))
// console.log('style=>' + JSON.stringify(style))
return style
},
...mapState([
......
......@@ -12,7 +12,7 @@
@mousedown="handleMouseDown"
>
<!-- 网格线 -->
<Grid v-if="canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus" :matrix-style="matrixStyle" />
<!-- <Grid v-if="canvasStyleData.auxiliaryMatrix&&!linkageSettingStatus" :matrix-style="matrixStyle" />-->
<!-- 仪表板联动清除按钮-->
<canvas-opt-bar />
......@@ -636,7 +636,7 @@ export default {
},
resizeView(index, item) {
if (item.type === 'view') {
console.log('view:resizeView')
// console.log('view:resizeView')
this.$refs.wrapperChild[index].chartResize()
}
}
......
......@@ -87,10 +87,12 @@ const data = {
setCurComponent(state, { component, index }) {
// 当前视图操作状态置空
if (component) {
component['optStatus'] = {
dragging: false,
resizing: false
}
}
state.styleChangeTimes = 0
state.curComponent = component
state.curComponentIndex = index
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论