fix: 🐛 字典和菜单打包警告问题修复
This commit is contained in:
@@ -21,6 +21,13 @@ const DictAPI = {
|
||||
});
|
||||
},
|
||||
|
||||
getList() {
|
||||
return request<any, OptionType[]>({
|
||||
url: `${DICT_BASE_URL}`,
|
||||
method: "get",
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 字典表单数据
|
||||
*
|
||||
|
||||
@@ -656,10 +656,7 @@ async function handleOpenDialog(tableName: string) {
|
||||
currentTableName.value = tableName;
|
||||
// 获取字典数据
|
||||
DictAPI.getList().then((data) => {
|
||||
dictOptions.value = data.map((item) => ({
|
||||
label: item.name,
|
||||
value: item.dictCode,
|
||||
}));
|
||||
dictOptions.value = data;
|
||||
loading.value = true;
|
||||
GeneratorAPI.getGenConfig(tableName)
|
||||
.then((data) => {
|
||||
|
||||
@@ -22,7 +22,7 @@ function handleConfirm(data: IUser[]) {
|
||||
}
|
||||
const text = computed(() => {
|
||||
// 获取字典数据
|
||||
const dictData = dictStore.getDictionary("gender");
|
||||
const dictData = dictStore.getDictItems("gender");
|
||||
const genderLabel = dictData.find((item: any) => item.value == selectedUser.value?.gender)?.label;
|
||||
return selectedUser.value
|
||||
? `${selectedUser.value.username} - ${genderLabel} - ${selectedUser.value.deptName}`
|
||||
|
||||
@@ -465,7 +465,7 @@ function handleSubmit() {
|
||||
handleQuery();
|
||||
});
|
||||
} else {
|
||||
MenuAPI.add(formData.value).then(() => {
|
||||
MenuAPI.create(formData.value).then(() => {
|
||||
ElMessage.success("新增成功");
|
||||
handleCloseDialog();
|
||||
handleQuery();
|
||||
|
||||
Reference in New Issue
Block a user