组件调整

This commit is contained in:
Rewrite0
2023-05-27 22:31:05 +08:00
parent 71b6ab1046
commit f0738070d3
2 changed files with 8 additions and 7 deletions

View File

@@ -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;
}
}
</script>
@@ -57,7 +57,7 @@ function close() {
leave-to="opacity-0 scale-95"
>
<DialogPanel>
<ab-container :title="title">
<ab-container :title="title" :class="[css]">
<slot></slot>
</ab-container>
</DialogPanel>

View File

@@ -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"
>
<div text-main>{{ i.label }}</div>