签入版本

This commit is contained in:
2026-10-11 19:06:33 +08:00
parent 17d28de8b7
commit 4084c6bd17
674 changed files with 58855 additions and 1892 deletions
@@ -141,14 +141,11 @@ export function getDictItemByCode(code) {
```vue
<template>
<el-select v-model="formData.status" placeholder="请选择状态">
<el-option
v-for="item in statusOptions"
:key="item.value"
:label="item.name"
:value="item.value"
/>
</el-select>
<n-select
v-model:value="formData.status"
:options="statusOptions"
placeholder="请选择状态"
/>
</template>
<script setup>
@@ -158,7 +155,9 @@ import { getDictItemByCode } from '@/api/common/index';
const statusOptions = ref([]);
onMounted(async () => {
statusOptions.value = await getDictItemByCode('example_status');
const list = await getDictItemByCode('example_status');
// n-select 的 options 需要 { label, value } 结构
statusOptions.value = list.map((item) => ({ label: item.name, value: item.value }));
});
</script>
```