feat: 优化 system

This commit is contained in:
xingyu4j
2025-06-24 17:35:43 +08:00
parent 9821f134fc
commit 34730ab1a0
22 changed files with 483 additions and 275 deletions

View File

@@ -116,7 +116,17 @@ export function useFormSchema(): VbenFormSchema[] {
componentProps: {
placeholder: '请输入自动授权范围',
mode: 'multiple',
// TODO @芋艿:根据权限,自动授权范围
},
dependencies: {
triggerFields: ['scopes'],
componentProps: (values) => ({
options: values.scopes
? values.scopes.map((scope: string) => ({
label: scope,
value: scope,
}))
: [],
}),
},
},
{

View File

@@ -30,9 +30,10 @@ const [Form, formApi] = useVbenForm({
componentProps: {
class: 'w-full',
},
formItemClass: 'col-span-2',
labelWidth: 140,
},
// 一共2列
wrapperClass: 'grid-cols-2',
layout: 'horizontal',
schema: useFormSchema(),
showDefaultActions: false,
@@ -83,7 +84,7 @@ const [Modal, modalApi] = useVbenModal({
</script>
<template>
<Modal class="w-2/5" :title="getTitle">
<Modal class="w-1/2" :title="getTitle">
<Form class="mx-4" />
</Modal>
</template>

View File

@@ -88,7 +88,7 @@ const [Grid, gridApi] = useVbenVxeGrid({
icon: ACTION_ICON.DELETE,
auth: ['system:oauth2-token:delete'],
popConfirm: {
title: $t('ui.actionMessage.deleteConfirm', [row.name]),
title: `确定要强退令牌吗?`,
confirm: handleDelete.bind(null, row),
},
},