From 7cfdfe5e5928c620d78b879d503d30c86081074f Mon Sep 17 00:00:00 2001
From: pipipi-pikachu <1171051090@qq.com>
Date: Thu, 7 Jan 2021 23:27:52 +0800
Subject: [PATCH] update
---
.../Editor/Toolbar/ElementPositionPanel.vue | 125 +++++++++++++-----
.../Editor/Toolbar/common/ElementOpacity.vue | 2 +-
.../Editor/Toolbar/common/ElementOutline.vue | 2 +-
.../Editor/Toolbar/common/ElementShadow.vue | 2 +-
4 files changed, 95 insertions(+), 36 deletions(-)
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 })