mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
feat(projects): 菜单字典适配 i18n
This commit is contained in:
@ -44,13 +44,15 @@ type Model = Api.System.DictDataOperateParams;
|
||||
|
||||
const model: Model = reactive(createDefaultModel());
|
||||
|
||||
const listClassOptions = [
|
||||
{ label: 'primary', value: 'primary' },
|
||||
{ label: 'success', value: 'success' },
|
||||
{ label: 'info', value: 'info' },
|
||||
{ label: 'warning', value: 'warning' },
|
||||
{ label: 'error', value: 'error' },
|
||||
{ label: 'default', value: 'default' }
|
||||
const listClassOptions: Record<string, string>[] = [
|
||||
{ label: 'Text', value: 'text' },
|
||||
{ label: 'Default', value: 'default' },
|
||||
{ label: 'Tertiary', value: 'tertiary' },
|
||||
{ label: 'Primary', value: 'primary' },
|
||||
{ label: 'Info', value: 'info' },
|
||||
{ label: 'Success', value: 'success' },
|
||||
{ label: 'Warning', value: 'warning' },
|
||||
{ label: 'Error', value: 'error' }
|
||||
];
|
||||
|
||||
function createDefaultModel(): Model {
|
||||
@ -134,6 +136,9 @@ watch(visible, () => {
|
||||
});
|
||||
|
||||
function renderTagLabel(option: { label: string; value: string }) {
|
||||
if (option.value === 'text') {
|
||||
return option.label;
|
||||
}
|
||||
return (
|
||||
<NTag size="small" type={option.value as any}>
|
||||
{option.label}
|
||||
|
Reference in New Issue
Block a user