diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue
index 49dc0f7295..0050af25ec 100644
--- a/frontend/src/components/DeDrag/index.vue
+++ b/frontend/src/components/DeDrag/index.vue
@@ -449,7 +449,7 @@ export default {
return {
width: this.computedWidth,
height: this.computedHeight,
- opacity: 0.4,
+ opacity: 0.2,
background: 'gray'
}
},
@@ -1254,7 +1254,7 @@ export default {
// this.recordMatrixCurStyle()
setTimeout(() => {
this.recordMatrixCurShadowStyle()
- }, 50)
+ }, 100)
}
this.hasMove && this.$store.commit('recordSnapshot', 'handleUp')
// 记录snapshot后 移动已记录设置为false
diff --git a/frontend/src/components/DeDrag/shadow.vue b/frontend/src/components/DeDrag/shadow.vue
index 3e9f668a8c..0c86adef46 100644
--- a/frontend/src/components/DeDrag/shadow.vue
+++ b/frontend/src/components/DeDrag/shadow.vue
@@ -64,10 +64,7 @@ export default {
const style = {
transform: `translate(${left}px, ${top}px) rotate(0deg)`,
width: width + 'px',
- height: height + 'px',
- opacity: 0.4,
- background: 'gray',
- position: 'absolute'
+ height: height + 'px'
}
// console.log('style=>' + JSON.stringify(style))
// 记录外部拖拽进入仪表板时阴影区域宽高
@@ -110,7 +107,10 @@ export default {
diff --git a/frontend/src/components/canvas/components/Editor/PGrid.vue b/frontend/src/components/canvas/components/Editor/PGrid.vue
index 817532c229..c23ea87262 100644
--- a/frontend/src/components/canvas/components/Editor/PGrid.vue
+++ b/frontend/src/components/canvas/components/Editor/PGrid.vue
@@ -3,8 +3,8 @@
-
diff --git a/frontend/src/components/canvas/components/Editor/index.vue b/frontend/src/components/canvas/components/Editor/index.vue
index 276a746f31..20ee1fe0f3 100644
--- a/frontend/src/components/canvas/components/Editor/index.vue
+++ b/frontend/src/components/canvas/components/Editor/index.vue
@@ -13,9 +13,9 @@
@scroll="canvasScroll"
>
-
+
-
+
@@ -120,7 +120,7 @@
-
+
@@ -853,6 +853,7 @@ export default {
},
data() {
return {
+ psDebug: false, // 定位调试模式
editorX: 0,
editorY: 0,
start: { // 选中区域的起点
@@ -1025,7 +1026,6 @@ export default {
mounted() {
// 获取编辑器元素
this.$store.commit('getEditor')
-
const _this = this
// bus.$on('auxiliaryMatrixChange', this.initMatrix)
bus.$on('auxiliaryMatrixChange', () => {
@@ -1033,7 +1033,6 @@ export default {
_this.initMatrix()
})
})
-
eventBus.$on('hideArea', () => {
this.hideArea()
})
@@ -1041,11 +1040,15 @@ export default {
// this.deleteCondition(condition)
// })
eventBus.$on('startMoveIn', this.startMoveIn)
-
eventBus.$on('openChartDetailsDialog', this.openChartDetailsDialog)
- setInterval(() => {
- _this.positionBoxInfoArray = positionBox
- }, 500)
+ bus.$on('onRemoveLastItem', this.removeLastItem)
+
+ // 矩阵定位调试模式
+ if (this.psDebug) {
+ setInterval(() => {
+ _this.positionBoxInfoArray = positionBox
+ }, 500)
+ }
},
created() {
// this.$store.dispatch('conditions/clear')
@@ -1675,6 +1678,10 @@ export default {
addItem.call(this, item, this.yourList.length - 1)
})
},
+ removeLastItem() {
+ console.log('rlI:' + JSON.stringify(this.yourList))
+ this.removeItem(this.yourList.length - 1)
+ },
startMoveIn() {
if (this.canvasStyleData.auxiliaryMatrix) {
const moveInItemInfo = this.$store.state.dragComponentInfo
diff --git a/frontend/src/store/index.js b/frontend/src/store/index.js
index c44db2bf77..80fc8294ba 100644
--- a/frontend/src/store/index.js
+++ b/frontend/src/store/index.js
@@ -27,6 +27,7 @@ import { Condition } from '@/components/widget/bean/Condition'
import {
DEFAULT_COMMON_CANVAS_STYLE_STRING
} from '@/views/panel/panel'
+import bus from '@/utils/bus'
Vue.use(Vuex)
@@ -280,6 +281,10 @@ const data = {
state.dragComponentInfo = dragComponentInfo
},
clearDragComponentInfo(state) {
+ // 如果当前没有拖拽的元素没有放置到画布 清理一下矩阵的占位符
+ if (state.dragComponentInfo.moveStatus !== 'drop') {
+ bus.$emit('onRemoveLastItem')
+ }
state.dragComponentInfo = null
}
},
diff --git a/frontend/src/views/chart/chart/chart.js b/frontend/src/views/chart/chart/chart.js
index 77fad0baed..e0bceaf5ed 100644
--- a/frontend/src/views/chart/chart/chart.js
+++ b/frontend/src/views/chart/chart/chart.js
@@ -184,7 +184,8 @@ export const DEFAULT_YAXIS_EXT_STYLE = {
}
export const DEFAULT_BACKGROUND_COLOR = {
color: '#ffffff',
- alpha: 0
+ alpha: 100,
+ borderRadius: 5
}
export const DEFAULT_SPLIT = {
name: {
diff --git a/frontend/src/views/panel/ViewSelect/index.vue b/frontend/src/views/panel/ViewSelect/index.vue
index 199c873e3b..9b58d88cbd 100644
--- a/frontend/src/views/panel/ViewSelect/index.vue
+++ b/frontend/src/views/panel/ViewSelect/index.vue
@@ -188,6 +188,7 @@ export default {
}
})
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
+ component.moveStatus = 'start'
return component
}
diff --git a/frontend/src/views/panel/edit/index.vue b/frontend/src/views/panel/edit/index.vue
index 8ed5f49081..012be7f51f 100644
--- a/frontend/src/views/panel/edit/index.vue
+++ b/frontend/src/views/panel/edit/index.vue
@@ -476,6 +476,7 @@ export default {
return data
},
handleDrop(e) {
+ this.dragComponentInfo.moveStatus = 'drop'
// 记录拖拽信息
this.dropComponentInfo = deepCopy(this.dragComponentInfo)
this.currentDropElement = e
diff --git a/frontend/src/views/panel/panel.js b/frontend/src/views/panel/panel.js
index f65a1dc72c..f238d33acd 100644
--- a/frontend/src/views/panel/panel.js
+++ b/frontend/src/views/panel/panel.js
@@ -7,7 +7,7 @@ export const DEFAULT_PANEL_STYLE = {
color: '#ffffff',
imageUrl: null,
backgroundType: 'image',
- gap: 'no'
+ gap: 'yes'
}
export const CANVAS_STYLE = {