feat: setting页面

This commit is contained in:
2026-04-22 16:11:16 +08:00
parent 38094c4b2c
commit 5d240edb84
4 changed files with 479 additions and 642 deletions

View File

@@ -29,6 +29,7 @@ const props = defineProps<{
modelValue: string | number | boolean | Array<string | number | boolean> | null
options: Option[] // 按钮选项数组
multiple?: boolean // 是否支持多选,默认为 false
max?: number // 多选时最多可选数量,不传则不限制
}>()
const emit = defineEmits<{
@@ -54,6 +55,9 @@ const selectOption = (value: any) => {
if (index >= 0) {
current.splice(index, 1)
} else {
if (typeof props.max === 'number' && props.max > 0 && current.length >= props.max) {
current.shift()
}
current.push(value)
}
emit('update:modelValue', current)

File diff suppressed because it is too large Load Diff