fix: 修复过滤组件取消,图片上传取消矩阵模式依然占位的问题

This commit is contained in:
wangjiahao 2021-10-12 12:33:00 +08:00
parent b5e0c6bd84
commit c81ca9d249
4 changed files with 14 additions and 5 deletions

View File

@ -1352,7 +1352,7 @@ export default {
this.dragComponentInfo.shadowStyle.y = e.pageY - 90
this.dragComponentInfo.style.left = this.dragComponentInfo.shadowStyle.x / this.scalePointWidth
this.dragComponentInfo.style.top = this.dragComponentInfo.shadowStyle.y / this.scalePointHeight
if (this.canvasStyleData.auxiliaryMatrix) {
if (this.dragComponentInfo.auxiliaryMatrix) {
this.onDragging(e, this.dragComponentInfo)
}
},
@ -1668,10 +1668,12 @@ export default {
},
removeLastItem() {
// console.log('rlI:' + JSON.stringify(this.yourList))
if (this.canvasStyleData.auxiliaryMatrix) {
this.removeItem(this.yourList.length - 1)
}
},
startMoveIn() {
if (this.canvasStyleData.auxiliaryMatrix) {
if (this.dragComponentInfo.auxiliaryMatrix) {
const moveInItemInfo = this.$store.state.dragComponentInfo
this.addItemBox(moveInItemInfo)
// console.log('startMoveIn:')

View File

@ -141,7 +141,13 @@ export default {
component = deepCopy(componentTemp)
}
})
//
if (component.type !== 'picture-add') {
component.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
} else {
component.auxiliaryMatrix = false
}
component.moveStatus = 'start'
return component
},
handleDragEnd(ev) {

View File

@ -607,6 +607,7 @@ export default {
this.filterVisible = false
this.currentWidget = null
this.clearCurrentInfo()
bus.$emit('onRemoveLastItem')
},
sureFilter() {
this.currentFilterCom.options.value = []

View File

@ -97,7 +97,7 @@ export default {
dragComponentInfo.sizex = Math.round(dragComponentInfo.style.width / this.curCanvasScale.matrixStyleOriginWidth)
dragComponentInfo.sizey = Math.round(dragComponentInfo.style.height / this.curCanvasScale.matrixStyleOriginHeight)
dragComponentInfo.auxiliaryMatrix = this.canvasStyleData.auxiliaryMatrix
dragComponentInfo.moveStatus = 'start'
this.$store.commit('setDragComponentInfo', dragComponentInfo)
ev.dataTransfer.effectAllowed = 'copy'
const dataTrans = {