From e3aef88a58682808474a9895dfa183f325a2b0ce Mon Sep 17 00:00:00 2001 From: pipipi-pikachu Date: Fri, 13 Oct 2023 14:14:21 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=8C=89=E9=92=AE=E7=BB=84=E6=A0=B7?= =?UTF-8?q?=E5=BC=8F=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Button.vue | 6 ++ src/components/ButtonGroup.vue | 83 +++++++++++++++---- .../ChartStylePanel/index.vue | 8 +- .../ElementStylePanel/ImageStylePanel.vue | 6 +- .../ElementStylePanel/MultiStylePanel.vue | 7 +- .../ElementStylePanel/ShapeStylePanel.vue | 7 +- .../ElementStylePanel/TableStylePanel.vue | 6 +- .../ElementStylePanel/TextStylePanel.vue | 33 ++++---- 8 files changed, 109 insertions(+), 47 deletions(-) diff --git a/src/components/Button.vue b/src/components/Button.vue index d2de3134..d1287058 100644 --- a/src/components/Button.vue +++ b/src/components/Button.vue @@ -9,6 +9,8 @@ 'checkbox': !disabled && type === 'checkbox', 'radio': !disabled && type === 'radio', 'small': size === 'small', + 'first': first, + 'last': last, }" @click="handleClick()" > @@ -22,11 +24,15 @@ const props = withDefaults(defineProps<{ disabled?: boolean type?: 'default' | 'primary' | 'checkbox' | 'radio' size?: 'small' | 'normal' + first?: boolean + last?: boolean }>(), { checked: false, disabled: false, type: 'default', size: 'normal', + first: false, + last: false, }) const emit = defineEmits<{ diff --git a/src/components/ButtonGroup.vue b/src/components/ButtonGroup.vue index 7da25077..b59b73f6 100644 --- a/src/components/ButtonGroup.vue +++ b/src/components/ButtonGroup.vue @@ -1,36 +1,85 @@