forked from github/dataease
fix(仪表板): 修复仪表板Tab内外相同字号在预览界面显示不同的问题
This commit is contained in:
parent
e07d0ba640
commit
9d9f7efbe9
@ -66,7 +66,7 @@ onMounted(() => {
|
||||
effect="dark"
|
||||
size="middle"
|
||||
:min="600"
|
||||
:max="100000"
|
||||
:max="50000"
|
||||
v-model="canvasStyleData.width"
|
||||
@change="onBaseChange"
|
||||
controls-position="right"
|
||||
@ -79,7 +79,7 @@ onMounted(() => {
|
||||
effect="dark"
|
||||
size="middle"
|
||||
:min="600"
|
||||
:max="100000"
|
||||
:max="50000"
|
||||
v-model="canvasStyleData.height"
|
||||
@change="onBaseChange"
|
||||
controls-position="right"
|
||||
|
@ -53,6 +53,11 @@ const props = defineProps({
|
||||
userId: {
|
||||
type: String,
|
||||
require: false
|
||||
},
|
||||
outerScale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
|
||||
@ -65,6 +70,7 @@ const {
|
||||
showPosition,
|
||||
previewActive,
|
||||
downloadStatus,
|
||||
outerScale,
|
||||
userId
|
||||
} = toRefs(props)
|
||||
const domId = 'preview-' + canvasId.value
|
||||
@ -134,7 +140,9 @@ const restore = () => {
|
||||
if (dashboardActive.value) {
|
||||
cellWidth.value = canvasWidth / pcMatrixCount.value.x
|
||||
cellHeight.value = canvasHeight / pcMatrixCount.value.y
|
||||
scaleWidth.value = scaleWidth.value * 1.5
|
||||
scaleWidth.value = isMainCanvas(canvasId.value)
|
||||
? scaleWidth.value * 1.5
|
||||
: outerScale.value * 100
|
||||
} else {
|
||||
changeRefComponentsSizeWithScale(
|
||||
componentData.value,
|
||||
|
@ -70,6 +70,7 @@
|
||||
:canvas-id="element.id + '--' + tabItem.name"
|
||||
:preview-active="editableTabsValue === tabItem.name"
|
||||
:show-position="showPosition"
|
||||
:outer-scale="scale"
|
||||
></de-preview>
|
||||
</el-tab-pane>
|
||||
</de-custom-tab>
|
||||
@ -150,6 +151,11 @@ const props = defineProps({
|
||||
type: String,
|
||||
required: false,
|
||||
default: 'canvas'
|
||||
},
|
||||
scale: {
|
||||
type: Number,
|
||||
required: false,
|
||||
default: 1
|
||||
}
|
||||
})
|
||||
const { element, isEdit, showPosition, canvasStyleData, canvasViewInfo, dvInfo } = toRefs(props)
|
||||
|
Loading…
Reference in New Issue
Block a user