diff --git a/src/views/Editor/Toolbar/ElementPositionPanel.vue b/src/views/Editor/Toolbar/ElementPositionPanel.vue index 37931d92..2152c2f4 100644 --- a/src/views/Editor/Toolbar/ElementPositionPanel.vue +++ b/src/views/Editor/Toolbar/ElementPositionPanel.vue @@ -1,29 +1,29 @@ diff --git a/src/views/Editor/Toolbar/common/ElementOpacity.vue b/src/views/Editor/Toolbar/common/ElementOpacity.vue index a2de20ce..5d14988c 100644 --- a/src/views/Editor/Toolbar/common/ElementOpacity.vue +++ b/src/views/Editor/Toolbar/common/ElementOpacity.vue @@ -36,7 +36,7 @@ export default defineComponent({ watch(handleElement, () => { if(!handleElement.value) return - opacity.value = 'opacity' in handleElement.value && handleElement.value.opacity || 1 + opacity.value = 'opacity' in handleElement.value && handleElement.value.opacity !== undefined ? handleElement.value.opacity : 1 }, { deep: true, immediate: true }) const { addHistorySnapshot } = useHistorySnapshot() diff --git a/src/views/Editor/Toolbar/common/ElementOutline.vue b/src/views/Editor/Toolbar/common/ElementOutline.vue index e21375f8..d1721201 100644 --- a/src/views/Editor/Toolbar/common/ElementOutline.vue +++ b/src/views/Editor/Toolbar/common/ElementOutline.vue @@ -80,7 +80,7 @@ export default defineComponent({ watch(handleElement, () => { if(!handleElement.value) return - outline.value = 'outline' in handleElement.value && handleElement.value.outline || undefined + outline.value = 'outline' in handleElement.value ? handleElement.value.outline : undefined hasOutline.value = !!outline.value }, { deep: true, immediate: true }) diff --git a/src/views/Editor/Toolbar/common/ElementShadow.vue b/src/views/Editor/Toolbar/common/ElementShadow.vue index c605c897..50027489 100644 --- a/src/views/Editor/Toolbar/common/ElementShadow.vue +++ b/src/views/Editor/Toolbar/common/ElementShadow.vue @@ -89,7 +89,7 @@ export default defineComponent({ watch(handleElement, () => { if(!handleElement.value) return - shadow.value = 'shadow' in handleElement.value && handleElement.value.shadow || undefined + shadow.value = 'shadow' in handleElement.value ? handleElement.value.shadow : undefined hasShadow.value = !!shadow.value }, { deep: true, immediate: true })