Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -15,15 +15,15 @@ const authStore = useAuthStore();
|
||||
|
||||
const MOCK_USER_OPTIONS: BasicOption[] = [
|
||||
{
|
||||
label: '超级管理员',
|
||||
label: 'Super',
|
||||
value: 'vben',
|
||||
},
|
||||
{
|
||||
label: '管理员',
|
||||
label: 'Admin',
|
||||
value: 'admin',
|
||||
},
|
||||
{
|
||||
label: '用户',
|
||||
label: 'User',
|
||||
value: 'jack',
|
||||
},
|
||||
];
|
||||
|
@@ -14,7 +14,7 @@ const [BaseForm] = useVbenForm({
|
||||
componentProps: {
|
||||
class: 'w-full',
|
||||
},
|
||||
labelWidth: 200,
|
||||
labelClass: 'w-2/6',
|
||||
},
|
||||
// 使用 tailwindcss grid布局
|
||||
// 提交函数
|
||||
|
@@ -210,7 +210,6 @@ function onSubmit(values: Record<string, any>) {
|
||||
function handleDelete() {
|
||||
formApi.setState((prev) => {
|
||||
return {
|
||||
...prev,
|
||||
schema: prev.schema?.filter((item) => item.fieldName !== 'field7'),
|
||||
};
|
||||
});
|
||||
@@ -219,7 +218,6 @@ function handleDelete() {
|
||||
function handleAdd() {
|
||||
formApi.setState((prev) => {
|
||||
return {
|
||||
...prev,
|
||||
schema: [
|
||||
...(prev?.schema ?? []),
|
||||
{
|
||||
@@ -235,7 +233,6 @@ function handleAdd() {
|
||||
function handleUpdate() {
|
||||
formApi.setState((prev) => {
|
||||
return {
|
||||
...prev,
|
||||
schema: prev.schema?.map((item) => {
|
||||
if (item.fieldName === 'field3') {
|
||||
return {
|
||||
|
Reference in New Issue
Block a user