使用字典值替换所有枚举对象.

This commit is contained in:
lijiahang
2023-10-27 14:48:50 +08:00
parent d32f21dc91
commit 706492f54a
48 changed files with 395 additions and 360 deletions

View File

@@ -20,7 +20,7 @@
import type { SelectOptionData } from '@arco-design/web-vue';
import { computed } from 'vue';
import { useCacheStore } from '@/store';
import { RoleStatusEnum } from '@/views/user/role/types/enum.types';
import { RoleStatus } from '@/views/user/role/types/const';
const props = defineProps({
modelValue: [Number, Array] as PropType<number | Array<number>>,
@@ -45,7 +45,7 @@
return cacheStore.roles.map(s => {
return {
label: `${s.name} (${s.code})`,
disabled: s.status === RoleStatusEnum.DISABLED.value,
disabled: s.status === RoleStatus.DISABLED,
value: s.id,
};
});