You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
699 B
34 lines
699 B
<script lang="ts" setup>
|
|
import type { DropdownMixedOption } from "naive-ui/es/dropdown/src/interface";
|
|
import type { PropType } from "vue";
|
|
|
|
defineOptions({ name: "Action" });
|
|
|
|
const props = defineProps({
|
|
options: {
|
|
type: Array as PropType<DropdownMixedOption[]>,
|
|
default: null,
|
|
required: true,
|
|
},
|
|
select: {
|
|
type: Function as PropType<Function>,
|
|
default: () => {},
|
|
},
|
|
id: {
|
|
type: String,
|
|
default: "",
|
|
},
|
|
});
|
|
const fun = (key) => {
|
|
props.select(key, props.id);
|
|
};
|
|
</script>
|
|
|
|
<template>
|
|
<div :data-id="id">
|
|
<n-dropdown trigger="hover" :options="options" @select="fun">
|
|
<SvgIcon name="more-hor" size="20" />
|
|
</n-dropdown>
|
|
</div>
|
|
</template>
|