diff --git a/frontend/src/components/DeDrag/index.vue b/frontend/src/components/DeDrag/index.vue
index 0ecc9460aa..ba4a5e3c35 100644
--- a/frontend/src/components/DeDrag/index.vue
+++ b/frontend/src/components/DeDrag/index.vue
@@ -64,7 +64,7 @@
@mousedown.stop.prevent="handleDown(handlei, $event)"
@touchstart.stop.prevent="handleTouchDown(handlei, $event)"
>
-
+
-
-
@@ -94,7 +100,6 @@ export default {
background-color: rgba(179, 212, 252);
}
-
.point-shadow-tips {
left: 0px;
top: 0px;
diff --git a/frontend/src/components/DeDrag/shadow.vue b/frontend/src/components/DeDrag/shadow.vue
index 26434ff922..a90e29a698 100644
--- a/frontend/src/components/DeDrag/shadow.vue
+++ b/frontend/src/components/DeDrag/shadow.vue
@@ -10,6 +10,7 @@
import { mapState } from 'vuex'
export default {
replace: true,
+ // eslint-disable-next-line
name: 'Shadow',
props: {
canvasId: {
@@ -18,7 +19,7 @@ export default {
}
},
computed: {
- curCanvasScaleSelf(){
+ curCanvasScaleSelf() {
return this.curCanvasScaleMap[this.canvasId]
},
styleInfo() {
diff --git a/frontend/src/components/canvas/DeCanvas.vue b/frontend/src/components/canvas/DeCanvas.vue
index 0b42e9dcc1..921f978d4d 100644
--- a/frontend/src/components/canvas/DeCanvas.vue
+++ b/frontend/src/components/canvas/DeCanvas.vue
@@ -1,7 +1,7 @@
-
- {e.target.value = '';}" @change="handleFileChange" >
+ {e.target.value = '';}"
+ @change="handleFileChange"
+ >
-
+
@@ -107,6 +121,35 @@ import FilterDialog from '@/views/panel/filter/filterDialog'
export default {
components: { FilterDialog, ButtonResetDialog, ButtonDialog, DeEditor },
+ props: {
+ parentForbid: {
+ type: Boolean,
+ require: false,
+ default: true
+ },
+ canvasStyleData: {
+ type: Object,
+ require: true
+ },
+ componentData: {
+ type: Array,
+ require: false,
+ default: () => []
+ },
+ canvasId: {
+ type: String,
+ require: true
+ },
+ canvasPid: {
+ type: String,
+ require: true
+ },
+ mobileLayoutStatus: {
+ type: Boolean,
+ require: false,
+ default: false
+ }
+ },
data() {
return {
// 需要展示属性设置的组件类型
@@ -140,44 +183,15 @@ export default {
}
}
},
- props: {
- parentForbid:{
- type: Boolean,
- require: false,
- default: true
- },
- canvasStyleData: {
- type: Object,
- require: true
- },
- componentData: {
- type: Array,
- require: false,
- default: []
- },
- canvasId: {
- type: String,
- require: true
- },
- canvasPid: {
- type: String,
- require: true
- },
- mobileLayoutStatus: {
- type: Boolean,
- require: false,
- default: false
- }
- },
computed: {
- matrixCountBase(){
- if(this.isMainCanvas && this.mobileLayoutStatus){
+ matrixCountBase() {
+ if (this.isMainCanvas && this.mobileLayoutStatus) {
return this.mobileMatrixCount
- }else{
+ } else {
return this.pcMatrixCountBase
}
},
- isMainCanvas(){
+ isMainCanvas() {
return this.canvasId === 'canvas-main'
},
panelInfo() {
@@ -224,7 +238,7 @@ export default {
watch: {
mobileLayoutStatus() {
this.restore()
- },
+ }
// //监控当前组件移动 检查是否靠近tab
// curComponent: {
// handler(newVal, oldVla) {
@@ -263,7 +277,7 @@ export default {
if (domInfo) {
this.outStyle.height = domInfo.offsetHeight - this.getGap()
// 临时处理 确保每次restore 有会更新
- this.outStyle.width = domInfo.offsetWidth + (Math.random() * 0.000001)
+ this.outStyle.width = domInfo.offsetWidth + (Math.random() * 0.000001)
}
})
},
@@ -570,7 +584,7 @@ export default {
// const canvasInfoMobile = document.getElementById(this.canvasDomId)
// canvasInfoMobile.scrollTop = canvasInfoMobile.scrollTop + offset
// this.$store.commit('setScrollAutoMove', this.scrollAutoMove + offset)
- },
+ }
}
}
diff --git a/frontend/src/components/canvas/components/Editor/DateFormat.vue b/frontend/src/components/canvas/components/Editor/DateFormat.vue
index af04e16a9a..840b8c1154 100644
--- a/frontend/src/components/canvas/components/Editor/DateFormat.vue
+++ b/frontend/src/components/canvas/components/Editor/DateFormat.vue
@@ -130,7 +130,7 @@ export default {
}
},
computed: {
- curCanvasScaleSelf(){
+ curCanvasScaleSelf() {
return this.curCanvasScaleMap[this.canvasId]
},
...mapState([
diff --git a/frontend/src/components/canvas/components/Editor/DeEditor.vue b/frontend/src/components/canvas/components/Editor/DeEditor.vue
index 9e9bfa3c7d..eccbc53c7c 100644
--- a/frontend/src/components/canvas/components/Editor/DeEditor.vue
+++ b/frontend/src/components/canvas/components/Editor/DeEditor.vue
@@ -13,8 +13,15 @@
@scroll="canvasScroll"
>
-
-
+
+
-
+
-
+
-
+
[]
},
canvasId: {
type: String,
@@ -893,18 +908,18 @@ export default {
moveTabCollisionActive() {
return this.tabCollisionActiveId
},
- pointShadowShow(){
- return this.canvasId==='canvas-main'
- && this.curComponent
- && this.curComponent.canvasId !== 'canvas-main'
- && this.tabMoveOutComponentId
+ pointShadowShow() {
+ return this.canvasId === 'canvas-main' &&
+ this.curComponent &&
+ this.curComponent.canvasId !== 'canvas-main' &&
+ this.tabMoveOutComponentId
},
shadowShow() {
- return ((this.curComponent
- && this.curComponent.auxiliaryMatrix
- && this.curComponent.canvasId === this.canvasId
- && (this.curComponent.optStatus.dragging || this.curComponent.optStatus.resizing))
- || (this.dragComponentInfo && this.dragComponentInfo.canvasId ===this.canvasId )) && !this.tabMoveInActive
+ return ((this.curComponent &&
+ this.curComponent.auxiliaryMatrix &&
+ this.curComponent.canvasId === this.canvasId &&
+ (this.curComponent.optStatus.dragging || this.curComponent.optStatus.resizing)) ||
+ (this.dragComponentInfo && this.dragComponentInfo.canvasId === this.canvasId)) && !this.tabMoveInActive
},
tabMoveInActive() {
return this.tabMoveInActiveId
@@ -928,7 +943,9 @@ export default {
}
},
// 挤占式画布设计
+ // eslint-disable-next-line
coordinates() {
+ // eslint-disable-next-line
return this.coordinates
},
customStyle() {
@@ -1419,7 +1436,7 @@ export default {
matrixStyleOriginWidth: this.matrixStyle.originWidth,
matrixStyleOriginHeight: this.matrixStyle.originHeight
})
- if(this.canvasId === 'canvas-main'){
+ if (this.canvasId === 'canvas-main') {
this.$store.commit('setPreviewCanvasScale', {
scaleWidth: this.scalePointWidth,
scaleHeight: this.scalePointHeight
diff --git a/frontend/src/components/canvas/components/Editor/EditBar.vue b/frontend/src/components/canvas/components/Editor/EditBar.vue
index d111132bc2..1340650372 100644
--- a/frontend/src/components/canvas/components/Editor/EditBar.vue
+++ b/frontend/src/components/canvas/components/Editor/EditBar.vue
@@ -319,7 +319,7 @@ export default {
miniWidth() {
return this.mobileLayoutStatus ? 1 : 4
},
- curCanvasScaleSelf(){
+ curCanvasScaleSelf() {
return this.curCanvasScaleMap[this.canvasId]
},
...mapState([
diff --git a/frontend/src/components/canvas/components/Editor/PGrid.vue b/frontend/src/components/canvas/components/Editor/PGrid.vue
index c2df81e89b..f1fba8b94c 100644
--- a/frontend/src/components/canvas/components/Editor/PGrid.vue
+++ b/frontend/src/components/canvas/components/Editor/PGrid.vue
@@ -6,8 +6,8 @@
class="outer-class"
>
diff --git a/frontend/src/components/canvas/components/Editor/Preview.vue b/frontend/src/components/canvas/components/Editor/Preview.vue
index 235c43e11b..3f36a04261 100644
--- a/frontend/src/components/canvas/components/Editor/Preview.vue
+++ b/frontend/src/components/canvas/components/Editor/Preview.vue
@@ -68,16 +68,14 @@ import { uuid } from 'vue-uuid'
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
import eventBus from '@/components/canvas/utils/eventBus'
import elementResizeDetectorMaker from 'element-resize-detector'
-import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog'
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
-import UserViewMobileDialog from '@/components/canvas/custom-component/UserViewMobileDialog'
import bus from '@/utils/bus'
import { buildFilterMap, buildViewKeyMap, formatCondition, valueValid, viewIdMatch } from '@/utils/conditionUtil'
import { hasDataPermission } from '@/utils/permission'
const erd = elementResizeDetectorMaker()
export default {
- components: { UserViewMobileDialog, ComponentWrapper, UserViewDialog, CanvasOptBar },
+ components: { ComponentWrapper, CanvasOptBar },
model: {
prop: 'show',
event: 'change'
@@ -142,10 +140,10 @@ export default {
},
data() {
return {
- previewDomId: 'preview-'+this.canvasId,
- previewRefId: 'preview-ref-'+this.canvasId,
- previewTempDomId: 'preview-temp-'+this.canvasId,
- previewTempRefId: 'preview-temp-ref-'+this.canvasId,
+ previewDomId: 'preview-' + this.canvasId,
+ previewRefId: 'preview-ref-' + this.canvasId,
+ previewTempDomId: 'preview-temp-' + this.canvasId,
+ previewTempRefId: 'preview-temp-ref-' + this.canvasId,
isShowPreview: false,
panelId: '',
needToChangeHeight: [
@@ -441,7 +439,7 @@ export default {
} else {
this.scaleHeight = canvasHeight * 100 / this.canvasStyleData.height// 获取高度比
}
- if(this.canvasId === 'canvas-main'){
+ if (this.canvasId === 'canvas-main') {
this.$store.commit('setPreviewCanvasScale', { scaleWidth: (this.scaleWidth / 100), scaleHeight: (this.scaleHeight / 100) })
}
this.handleScaleChange()
diff --git a/frontend/src/components/canvas/components/Editor/PreviewMobile.vue b/frontend/src/components/canvas/components/Editor/PreviewMobile.vue
index 866a97716e..5a5eac8c9d 100644
--- a/frontend/src/components/canvas/components/Editor/PreviewMobile.vue
+++ b/frontend/src/components/canvas/components/Editor/PreviewMobile.vue
@@ -46,11 +46,10 @@ import { uuid } from 'vue-uuid'
import { deepCopy, imgUrlTrans } from '@/components/canvas/utils/utils'
import eventBus from '@/components/canvas/utils/eventBus'
import elementResizeDetectorMaker from 'element-resize-detector'
-import UserViewDialog from '@/components/canvas/custom-component/UserViewDialog'
import CanvasOptBar from '@/components/canvas/components/Editor/CanvasOptBar'
export default {
- components: { ComponentWrapper, UserViewDialog, CanvasOptBar },
+ components: { ComponentWrapper, CanvasOptBar },
model: {
prop: 'show',
event: 'change'
diff --git a/frontend/src/components/canvas/components/TextAttr.vue b/frontend/src/components/canvas/components/TextAttr.vue
index ab657a25fa..7e3b2e874e 100644
--- a/frontend/src/components/canvas/components/TextAttr.vue
+++ b/frontend/src/components/canvas/components/TextAttr.vue
@@ -319,7 +319,10 @@
style="width: 20px;float: left;margin-top: 2px;margin-left: 10px;"
>
-
+
@@ -601,7 +604,7 @@ export default {
showVertical() {
return !['textSelectGridWidget', 'numberSelectGridWidget'].includes(this.curComponent.serviceName)
},
- curCanvasScaleSelf(){
+ curCanvasScaleSelf() {
return this.curCanvasScaleMap[this.canvasId]
},
...mapState([
diff --git a/frontend/src/components/canvas/utils/utils.js b/frontend/src/components/canvas/utils/utils.js
index 319232a686..d3ab9c2e14 100644
--- a/frontend/src/components/canvas/utils/utils.js
+++ b/frontend/src/components/canvas/utils/utils.js
@@ -136,7 +136,6 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
// 增加所属画布ID(canvasId)当前所在画布的父ID(canvasPid) 主画布ID为main-canvas, PID = 0 表示当前所属canvas为最顶层
item.canvasId = (item.canvasId || 'canvas-main')
item.canvasPid = (item.canvasPid || '0')
-
})
// 初始化密度为最高密度
componentStyle.aidedDesign.matrixBase = 4
@@ -149,7 +148,7 @@ export function panelDataPrepare(componentData, componentStyle, callback) {
export function resetID(data) {
if (data) {
data.forEach(item => {
- item.type !== 'custom' && item.type !== 'de-tabs'&& (item.id = uuid.v1())
+ item.type !== 'custom' && item.type !== 'de-tabs' && (item.id = uuid.v1())
})
}
return data
@@ -229,6 +228,6 @@ export function imgUrlTrans(url) {
}
}
-export function getNowCanvasComponentData(canvasId){
- return store.state.componentData.filter(item => item.canvasId===canvasId)
+export function getNowCanvasComponentData(canvasId) {
+ return store.state.componentData.filter(item => item.canvasId === canvasId)
}
diff --git a/frontend/src/components/dataease/DeOutWidget.vue b/frontend/src/components/dataease/DeOutWidget.vue
index 4d567a5a60..ceec98763f 100644
--- a/frontend/src/components/dataease/DeOutWidget.vue
+++ b/frontend/src/components/dataease/DeOutWidget.vue
@@ -39,8 +39,8 @@
:is="element.component"
v-if="element.type==='custom'"
:id="'component' + element.id"
- :canvas-id="canvasId"
ref="deOutWidget"
+ :canvas-id="canvasId"
class="component-custom"
:out-style="element.style"
:is-relation="isRelation"
@@ -59,7 +59,6 @@