chore: 完善字典封装

This commit is contained in:
xlsea
2024-09-06 15:55:35 +08:00
parent c47de5f834
commit 226568b3af
3 changed files with 42 additions and 27 deletions

View File

@ -40,9 +40,8 @@ const visible = defineModel<boolean>('visible', {
default: false
});
const { getDictOptions } = useDict();
const showHideOptions = getDictOptions('sys_show_hide');
const enableStatusOptions = getDictOptions('sys_normal_disable');
const { options: showHideOptions, getOptions: getShowHideOptions } = useDict('sys_show_hide', false);
const { options: enableStatusOptions, getOptions: getNormalDisableOptions } = useDict('sys_normal_disable', false);
const iconType = ref<Api.System.IconType>('1');
const { formRef, validate, restoreValidation } = useNaiveForm();
@ -221,6 +220,9 @@ watch(visible, () => {
if (visible.value) {
handleInitModel();
restoreValidation();
getShowHideOptions();
getShowHideOptions();
getNormalDisableOptions();
}
});