From f0738070d3406f92eaee921069ebfa49355c7ead Mon Sep 17 00:00:00 2001 From: Rewrite0 <49576640+Rewrite0@users.noreply.github.com> Date: Sat, 27 May 2023 22:31:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E4=BB=B6=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ab-popup.vue | 12 ++++++------ src/components/ab-status-bar.vue | 3 ++- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/ab-popup.vue b/src/components/ab-popup.vue index d569ff87..b7c036ed 100644 --- a/src/components/ab-popup.vue +++ b/src/components/ab-popup.vue @@ -8,22 +8,22 @@ import { const props = withDefaults( defineProps<{ - show: boolean; title: string; - maskClick: boolean; + maskClick?: boolean; + css?: string; }>(), { - show: false, title: 'title', maskClick: true, + css: '', } ); -const emit = defineEmits(['update:show']); +const show = defineModel('show', { default: false }); function close() { if (props.maskClick) { - emit('update:show', false); + show.value = false; } } @@ -57,7 +57,7 @@ function close() { leave-to="opacity-0 scale-95" > - + diff --git a/src/components/ab-status-bar.vue b/src/components/ab-status-bar.vue index 5c5eae97..34905a0e 100644 --- a/src/components/ab-status-bar.vue +++ b/src/components/ab-status-bar.vue @@ -5,7 +5,7 @@ import { AddOne, More } from '@icon-park/vue-next'; withDefaults( defineProps<{ running: boolean; - items: { id: number; icon: any; label: string }[]; + items: { id: number; icon: any; label: string; handle: () => void }[]; }>(), { running: false, @@ -47,6 +47,7 @@ withDefaults( hover:bg-primary class="group" :class="[active ? 'text-white bg-theme-row' : 'text-black']" + @click="i.handle" >
{{ i.label }}