Merge branch 'main' of https://github.com/vbenjs/vue-vben-admin
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
"#/*": "./src/*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tanstack/vue-query": "^5.55.4",
|
||||
"@tanstack/vue-query": "^5.56.2",
|
||||
"@vben/access": "workspace:*",
|
||||
"@vben/common-ui": "workspace:*",
|
||||
"@vben/constants": "workspace:*",
|
||||
|
@@ -19,7 +19,12 @@ const router = createRouter({
|
||||
: createWebHistory(import.meta.env.VITE_BASE),
|
||||
// 应该添加到路由的初始路由列表。
|
||||
routes,
|
||||
scrollBehavior: () => ({ left: 0, top: 0 }),
|
||||
scrollBehavior: (to, _from, savedPosition) => {
|
||||
if (savedPosition) {
|
||||
return savedPosition;
|
||||
}
|
||||
return to.hash ? { behavior: 'smooth', el: to.hash } : { left: 0, top: 0 };
|
||||
},
|
||||
// 是否应该禁止尾部斜杠。
|
||||
// strict: true,
|
||||
});
|
||||
|
@@ -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