feat: naive system init

This commit is contained in:
xingyu4j
2025-10-16 16:35:02 +08:00
parent bac9b0d747
commit 757eb72018
97 changed files with 13178 additions and 7 deletions

View File

@@ -145,14 +145,12 @@ setupVbenVxeTable({
const loadingKey = `__loading_${column.field}`;
const finallyProps = {
inlinePrompt: true,
activeText: $t('common.enabled'),
inactiveText: $t('common.disabled'),
activeValue: 1,
inactiveValue: 0,
checkedValue: 0,
uncheckedValue: 1,
...props,
modelValue: row[column.field],
value: row[column.field],
loading: row[loadingKey] ?? false,
'onUpdate:modelValue': onChange,
'onUpdate:value': onChange,
};
async function onChange(newVal: any) {
@@ -167,7 +165,10 @@ setupVbenVxeTable({
}
}
return h(NSwitch, finallyProps);
return h(NSwitch, finallyProps, {
checked: $t('common.enabled'),
unchecked: $t('common.disabled'),
});
},
});
@@ -206,4 +207,5 @@ setupVbenVxeTable({
export { useVbenVxeGrid };
export * from '#/components/table-action';
export type * from '@vben/plugins/vxe-table';