client: refactor super-menu component to composition API

This commit is contained in:
Johann150 2022-10-07 11:28:49 +02:00
parent 8311b30b4c
commit 64e3239566
Signed by untrusted user: Johann150
GPG key ID: 9EE6577A2A06F8F1

View file

@ -23,21 +23,34 @@
</div> </div>
</template> </template>
<script lang="ts"> <script lang="ts" setup>
import { defineComponent } from 'vue'; type MenuItem = {
text: string;
icon?: string;
danger?: boolean;
active?: boolean;
i?: number;
} & (
{
type: 'a';
href: string;
target?: string;
} | {
type: 'button';
action(MouseEvent): void;
} | {
to: string;
}
);
export default defineComponent({ withDefaults(defineProps<{
props: { def: {
def: { title?: string;
type: Array, items: MenuItem[];
required: true, }[];
}, grid?: boolean;
grid: { }>(), {
type: Boolean, grid: false,
required: false,
default: false,
},
},
}); });
</script> </script>