From b8d108d574916aa7ae04e4fcf0858342c7c8c241 Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Sat, 3 Sep 2022 10:00:43 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=A6=81=E6=AD=A2=E7=AB=96=E5=90=91?= =?UTF-8?q?=E6=96=87=E6=9C=AC=E9=80=9A=E8=BF=87=E4=BD=8D=E7=BD=AE=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E4=BF=AE=E6=94=B9=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/Editor/Toolbar/ElementPositionPanel.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/views/Editor/Toolbar/ElementPositionPanel.vue b/src/views/Editor/Toolbar/ElementPositionPanel.vue index b8ce13d3..73f99487 100644 --- a/src/views/Editor/Toolbar/ElementPositionPanel.vue +++ b/src/views/Editor/Toolbar/ElementPositionPanel.vue @@ -68,6 +68,7 @@ :min="minSize" :max="1500" :step="5" + :disabled="isVerticalText" :value="width" @change="value => updateWidth(value as number)" style="flex: 4;" @@ -85,7 +86,7 @@ :min="minSize" :max="800" :step="5" - :disabled="handleElement!.type === 'text'" + :disabled="isHorizontalText" :value="height" @change="value => updateHeight(value as number)" style="flex: 4;" @@ -158,6 +159,13 @@ const minSize = computed(() => { return MIN_SIZE[handleElement.value.type] || 20 }) +const isHorizontalText = computed(() => { + return handleElement.value?.type === 'text' && !handleElement.value.vertical +}) +const isVerticalText = computed(() => { + return handleElement.value?.type === 'text' && handleElement.value.vertical +}) + watch(handleElement, () => { if (!handleElement.value) return