{{ batchOptStatus?$t('panel.cancel_batch_opt'):$t('panel.batch_opt') }}
+ >{{ batchOptStatus ? $t('panel.cancel_batch_opt') : $t('panel.batch_opt') }}
{{
- $t('panel.panel_save_warn_tips')
- }}
+ $t('panel.panel_save_warn_tips')
+ }}
import generateID from '@/components/canvas/utils/generateID'
import toast from '@/components/canvas/utils/toast'
-import { mapState } from 'vuex'
-import { commonAttr, commonStyle } from '@/components/canvas/customComponent/component-list'
+import {mapState} from 'vuex'
+import {commonAttr, commonStyle} from '@/components/canvas/customComponent/component-list'
import eventBus from '@/components/canvas/utils/eventBus'
-import { deepCopy, mobile2MainCanvas } from '@/components/canvas/utils/utils'
-import { panelUpdate, removePanelCache, saveCache } from '@/api/panel/panel'
-import { getPanelAllLinkageInfo, saveLinkage } from '@/api/panel/linkage'
+import {deepCopy, mobile2MainCanvas} from '@/components/canvas/utils/utils'
+import {panelUpdate, removePanelCache, saveCache} from '@/api/panel/panel'
+import {getPanelAllLinkageInfo, saveLinkage} from '@/api/panel/linkage'
import bus from '@/utils/bus'
-import { queryPanelJumpInfo } from '@/api/panel/linkJump'
-import { inOtherPlatform } from '@/utils/index'
+import {queryPanelJumpInfo} from '@/api/panel/linkJump'
+import {inOtherPlatform} from '@/utils/index'
+
export default {
name: 'Toolbar',
props: {
@@ -274,6 +275,7 @@ export default {
return {
showPageLine: false,
showGridSwitch: false,
+ autoSizeAdaptorSwitch: true,
mobileLayoutInitStatus: false,
isShowPreview: false,
needToChange: [
@@ -333,6 +335,7 @@ export default {
this.scale = this.canvasStyleData.scale
this.mobileLayoutInitStatus = this.mobileLayoutStatus
this.showGridSwitch = this.canvasStyleData.aidedDesign.showGrid
+ this.autoSizeAdaptorSwitch = this.canvasStyleData.autoSizeAdaptor || true
this.showPageLine = this.canvasStyleData.pdfPageLine?.showPageLine
this.autoCache()
},
@@ -362,7 +365,7 @@ export default {
this.$emit('close-left-panel')
removePanelCache(this.panelInfo.id)
this.$nextTick(() => {
- bus.$emit('PanelSwitchComponent', { name: 'PanelMain' })
+ bus.$emit('PanelSwitchComponent', {name: 'PanelMain'})
})
},
closePanelEdit() {
@@ -545,7 +548,7 @@ export default {
this.$store.commit('setComponentData', [])
this.$store.commit('recordSnapshot', 'clearCanvas')
bus.$emit('change_panel_right_draw', false)
- this.$store.commit('setCurComponent', { component: null, index: null })
+ this.$store.commit('setCurComponent', {component: null, index: null})
},
handlePreviewChange() {
@@ -572,7 +575,7 @@ export default {
const linkageInfo = this.targetLinkageInfo[key]
const linkageFields = linkageInfo['linkageFields']
if (linkageFields) {
- linkageFields.forEach(function(linkage) {
+ linkageFields.forEach(function (linkage) {
if (!(linkage.sourceField && linkage.targetField)) {
subCheckCount++
}
@@ -623,6 +626,10 @@ export default {
this.$store.commit('canvasChange')
this.canvasStyleData.aidedDesign.showGrid = !this.canvasStyleData.aidedDesign.showGrid
},
+ showSizeAdaptorSwitchChange() {
+ this.$store.commit('canvasChange')
+ this.canvasStyleData.autoSizeAdaptor = !this.canvasStyleData.autoSizeAdaptor
+ },
showPageLineChange() {
this.$store.commit('canvasChange')
this.canvasStyleData.pdfPageLine.showPageLine = !this.canvasStyleData.pdfPageLine.showPageLine
diff --git a/core/frontend/src/components/canvas/components/editor/DeEditor.vue b/core/frontend/src/components/canvas/components/editor/DeEditor.vue
index 2407a73cb2..be9c815dd5 100644
--- a/core/frontend/src/components/canvas/components/editor/DeEditor.vue
+++ b/core/frontend/src/components/canvas/components/editor/DeEditor.vue
@@ -150,13 +150,13 @@