fix: 修改页面 changeSize 逻辑

This commit is contained in:
MTrun
2022-03-10 17:55:59 +08:00
parent 5b5f59da91
commit 4c6ed77806
5 changed files with 13 additions and 9 deletions
@@ -7,7 +7,7 @@
size="small"
v-model:value="canvasConfig.width"
:validator="validator"
@update:value="chartEditStore.computedScale"
@update:value="changeSizeHandle"
/>
</n-form-item>
<n-form-item label="高度">
@@ -15,7 +15,7 @@
size="small"
v-model:value="canvasConfig.height"
:validator="validator"
@update:value="chartEditStore.computedScale"
@update:value="changeSizeHandle"
/>
</n-form-item>
</n-form>
@@ -182,6 +182,12 @@ const beforeUploadHandle = async ({ file }) => {
return true
}
// 修改尺寸
const changeSizeHandle = () => {
chartEditStore.computedScale
chartEditStore.setPageSize
}
// 清除背景
const clearImage = () => {
chartEditStore.setEditCanvasConfig(
@@ -38,6 +38,7 @@ const targetData: Ref<CreateComponentType> = computed(() => {
const targetIndex = chartEditStore.fetchTargetIndex()
return list[targetIndex]
})
</script>
<style lang="scss" scoped>
@@ -17,9 +17,6 @@ export const useLayout = () => {
document.getElementById('go-chart-edit-content')
)
// 大小初始化
chartEditStore.setPageSize()
// 监听初始化
const removeScale = chartEditStore.listenerScale()
-1
View File
@@ -1,7 +1,6 @@
<template>
<ContentBox
id="go-chart-edit-layout"
ref="editDomRef"
:flex="true"
:showTop="false"
:showBottom="true"