feat: 同步质量校验修复并精简工作台操作

This commit is contained in:
GouJ committed 2026-09-03 19:38:57 +08:00
1 parent 771b66cafc
commit 13bb6dc83b
47 files changed
+2244 -260

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
<script setup lang="ts">
import { ref } from 'vue'
import { NButton, NDropdown } from 'naive-ui'
import { Ellipsis } from '@lucide/vue'
/** 低频操作集中到键盘可访问的菜单;选中禁用项也不会向外触发动作。 */
const props = withDefaults(
defineProps<{ label?: string; items: { key: string; label: string; disabled?: boolean }[] }>(),
{ label: '更多操作' }
)
const emit = defineEmits<{ select: [key: string] }>()
const open = ref(false)
function select(key: string) {
const item = props.items.find(option => option.key === key)
if (!item || item.disabled) return
emit('select', key)
open.value = false
}
</script>
<template>
<NDropdown trigger="click" placement="bottom-end" :options="items" v-model:show="open" @select="select">
<NButton
quaternary
class="icon-button"
:aria-label="label"
:title="label"
aria-haspopup="menu"
:aria-expanded="open"
><template #icon><Ellipsis :size="18" /></template
></NButton>
</NDropdown>
</template>