mirror of
https://github.com/pipipi-pikachu/PPTist.git
synced 2025-04-15 02:20:00 +08:00
fix: 禁止竖向文本通过位置面板修改宽度
This commit is contained in:
parent
fef42b770c
commit
b8d108d574
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user