Merge pull request #6803 from dataease/pr@dev@fix_mobile-show

fix: 修复移动端设计界面待选组件区域字体显示比例过大问题
This commit is contained in:
王嘉豪 2023-11-22 19:14:05 +08:00 committed by GitHub
commit 317e186d51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 7 deletions

View File

@ -138,8 +138,8 @@
<span class="icon iconfont icon-adaptor icon16" />
<span class="text14 margin-left8">{{ $t('panel.auto_size_adaptor') }}</span>
<el-switch
v-model="autoSizeAdaptorSwitch"
:class="[{['grid-active']: autoSizeAdaptorSwitch},'margin-left8']"
v-model="canvasStyleData.autoSizeAdaptor"
:class="[{['grid-active']: canvasStyleData.autoSizeAdaptor},'margin-left8']"
size="mini"
@change="showSizeAdaptorSwitchChange"
/>
@ -285,7 +285,6 @@ export default {
return {
showPageLine: false,
showGridSwitch: false,
autoSizeAdaptorSwitch: true,
mobileLayoutInitStatus: false,
isShowPreview: false,
needToChange: [
@ -346,7 +345,6 @@ 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()
},
@ -640,7 +638,7 @@ export default {
},
showSizeAdaptorSwitchChange() {
this.$store.commit('canvasChange')
this.canvasStyleData.autoSizeAdaptor = !this.canvasStyleData.autoSizeAdaptor
// this.canvasStyleData.autoSizeAdaptor = !this.canvasStyleData.autoSizeAdaptor
eventBus.$emit('componentSizeAdaptorChange')
},
showPageLineChange() {

View File

@ -377,14 +377,14 @@ export default {
return !(this.isEdit && this.currentCanvasNewId.includes(this.element.id)) && this.isFirstLoad
},
scaleCoefficient() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
if (this.terminal === 'pc' && (!this.mobileLayoutStatus || this.showPosition === 'preview-wait')) {
return 1.1
} else {
return 4.5
}
},
scaleCoefficientType() {
if (this.terminal === 'pc' && !this.mobileLayoutStatus) {
if (this.terminal === 'pc' && (!this.mobileLayoutStatus || this.showPosition === 'preview-wait')) {
return 'pc'
} else {
return 'mobile'

View File

@ -33,6 +33,7 @@
:is-edit="false"
:element="config"
:h="outItemHeight"
:show-position="'preview-wait'"
:canvas-style-data="canvasStyleData"
/>