mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-02-02 19:08:40 +08:00
合并
This commit is contained in:
parent
3cdf6c74f8
commit
42bd7b0153
0
.husky/pre-commit
Executable file
0
.husky/pre-commit
Executable file
0
src/api/sys/menu.ts
Normal file
0
src/api/sys/menu.ts
Normal file
@ -11,12 +11,6 @@ export const columns: BasicColumn[] = [
|
|||||||
width: 200,
|
width: 200,
|
||||||
align: 'left',
|
align: 'left',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
title: '菜单标题',
|
|
||||||
dataIndex: 'meta.title',
|
|
||||||
width: 200,
|
|
||||||
align: 'left',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
title: '图标',
|
title: '图标',
|
||||||
dataIndex: 'icon',
|
dataIndex: 'icon',
|
||||||
@ -36,7 +30,7 @@ export const columns: BasicColumn[] = [
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '排序',
|
title: '排序',
|
||||||
dataIndex: 'order_no',
|
dataIndex: 'orderNo',
|
||||||
width: 50,
|
width: 50,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -59,7 +53,7 @@ export const columns: BasicColumn[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
const isDir = (type: string) => type === '0';
|
const isDir = (type: string) => type === '0';
|
||||||
// const isMenu = (type: string) => type === '1';
|
const isMenu = (type: string) => type === '1';
|
||||||
const isButton = (type: string) => type === '2';
|
const isButton = (type: string) => type === '2';
|
||||||
|
|
||||||
export const searchFormSchema: FormSchema[] = [
|
export const searchFormSchema: FormSchema[] = [
|
||||||
@ -84,40 +78,34 @@ export const searchFormSchema: FormSchema[] = [
|
|||||||
];
|
];
|
||||||
|
|
||||||
export const formSchema: FormSchema[] = [
|
export const formSchema: FormSchema[] = [
|
||||||
// {
|
|
||||||
// field: 'type',
|
|
||||||
// label: '菜单类型',
|
|
||||||
// component: 'RadioButtonGroup',
|
|
||||||
// defaultValue: '0',
|
|
||||||
// componentProps: {
|
|
||||||
// options: [
|
|
||||||
// { label: '目录', value: '0' },
|
|
||||||
// { label: '菜单', value: '1' },
|
|
||||||
// { label: '按钮', value: '2' },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// colProps: { lg: 24, md: 24 },
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: 'name',
|
field: 'type',
|
||||||
label: '菜单名称',
|
label: '菜单类型',
|
||||||
component: 'Input',
|
component: 'RadioButtonGroup',
|
||||||
required: true,
|
defaultValue: '0',
|
||||||
|
componentProps: {
|
||||||
|
options: [
|
||||||
|
{ label: '目录', value: '0' },
|
||||||
|
{ label: '菜单', value: '1' },
|
||||||
|
{ label: '按钮', value: '2' },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
colProps: { lg: 24, md: 24 },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'title',
|
field: 'menuName',
|
||||||
label: '菜单标题',
|
label: '菜单名称',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'parent',
|
field: 'parentMenu',
|
||||||
label: '上级菜单',
|
label: '上级菜单',
|
||||||
component: 'TreeSelect',
|
component: 'TreeSelect',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
replaceFields: {
|
replaceFields: {
|
||||||
title: 'name',
|
title: 'menuName',
|
||||||
key: 'id',
|
key: 'id',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
},
|
},
|
||||||
@ -126,36 +114,31 @@ export const formSchema: FormSchema[] = [
|
|||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'order_no',
|
field: 'orderNo',
|
||||||
label: '排序',
|
label: '排序',
|
||||||
defaultValue: 0,
|
|
||||||
component: 'InputNumber',
|
component: 'InputNumber',
|
||||||
componentProps: {
|
|
||||||
min: 0,
|
|
||||||
},
|
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'icon',
|
field: 'icon',
|
||||||
label: '图标',
|
label: '图标',
|
||||||
component: 'IconPicker',
|
component: 'IconPicker',
|
||||||
|
required: true,
|
||||||
show: ({ values }) => !isButton(values.type),
|
show: ({ values }) => !isButton(values.type),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'path',
|
field: 'routePath',
|
||||||
label: '路由地址',
|
label: '路由地址',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
required: true,
|
required: true,
|
||||||
// show: ({ values }) => !isButton(values.type),
|
show: ({ values }) => !isButton(values.type),
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'component',
|
field: 'component',
|
||||||
label: '组件路径',
|
label: '组件路径',
|
||||||
component: 'Input',
|
component: 'Input',
|
||||||
required: true,
|
show: ({ values }) => isMenu(values.type),
|
||||||
// show: ({ values }) => isMenu(values.type),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'permission',
|
field: 'permission',
|
||||||
@ -163,75 +146,57 @@ export const formSchema: FormSchema[] = [
|
|||||||
component: 'Input',
|
component: 'Input',
|
||||||
show: ({ values }) => !isDir(values.type),
|
show: ({ values }) => !isDir(values.type),
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// field: 'isRedirect',
|
|
||||||
// label: '是否重定向',
|
|
||||||
// component: 'RadioButtonGroup',
|
|
||||||
// defaultValue: 0,
|
|
||||||
// componentProps: {
|
|
||||||
// options: [
|
|
||||||
// { label: '是', value: 1 },
|
|
||||||
// { label: '否', value: 0 },
|
|
||||||
// ],
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// field: 'redirect',
|
|
||||||
// label: '路由重定向',
|
|
||||||
// component: 'Input',
|
|
||||||
// show: ({ values }) => !!values.isRedirect,
|
|
||||||
// },
|
|
||||||
{
|
{
|
||||||
field: 'status',
|
field: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
defaultValue: 1,
|
defaultValue: '0',
|
||||||
componentProps: {
|
componentProps: {
|
||||||
options: [
|
options: [
|
||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: '0' },
|
||||||
{ label: '禁用', value: 0 },
|
{ label: '禁用', value: '1' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
{
|
||||||
// field: 'isExt',
|
field: 'isExt',
|
||||||
// label: '是否外链',
|
label: '是否外链',
|
||||||
// component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
// defaultValue: '0',
|
defaultValue: '0',
|
||||||
// componentProps: {
|
componentProps: {
|
||||||
// options: [
|
options: [
|
||||||
// { label: '否', value: '0' },
|
{ label: '否', value: '0' },
|
||||||
// { label: '是', value: '1' },
|
{ label: '是', value: '1' },
|
||||||
// ],
|
],
|
||||||
// },
|
},
|
||||||
// show: ({ values }) => !isButton(values.type),
|
show: ({ values }) => !isButton(values.type),
|
||||||
// },
|
},
|
||||||
|
|
||||||
// {
|
{
|
||||||
// field: 'keepalive',
|
field: 'keepalive',
|
||||||
// label: '是否缓存',
|
label: '是否缓存',
|
||||||
// component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
// defaultValue: '0',
|
defaultValue: '0',
|
||||||
// componentProps: {
|
componentProps: {
|
||||||
// options: [
|
options: [
|
||||||
// { label: '否', value: '0' },
|
{ label: '否', value: '0' },
|
||||||
// { label: '是', value: '1' },
|
{ label: '是', value: '1' },
|
||||||
// ],
|
],
|
||||||
// },
|
},
|
||||||
// show: ({ values }) => isMenu(values.type),
|
show: ({ values }) => isMenu(values.type),
|
||||||
// },
|
},
|
||||||
|
|
||||||
// {
|
{
|
||||||
// field: 'show',
|
field: 'show',
|
||||||
// label: '是否显示',
|
label: '是否显示',
|
||||||
// component: 'RadioButtonGroup',
|
component: 'RadioButtonGroup',
|
||||||
// defaultValue: '0',
|
defaultValue: '0',
|
||||||
// componentProps: {
|
componentProps: {
|
||||||
// options: [
|
options: [
|
||||||
// { label: '是', value: '0' },
|
{ label: '是', value: '0' },
|
||||||
// { label: '否', value: '1' },
|
{ label: '否', value: '1' },
|
||||||
// ],
|
],
|
||||||
// },
|
},
|
||||||
// show: ({ values }) => !isButton(values.type),
|
show: ({ values }) => !isButton(values.type),
|
||||||
// },
|
},
|
||||||
];
|
];
|
||||||
|
@ -107,8 +107,8 @@ const loading = ref(false);
|
|||||||
const rememberMe = ref(false);
|
const rememberMe = ref(false);
|
||||||
|
|
||||||
const formData = reactive({
|
const formData = reactive({
|
||||||
account: '',
|
account: 'admin',
|
||||||
password: '',
|
password: '123456',
|
||||||
});
|
});
|
||||||
|
|
||||||
const { validForm } = useFormValid(formRef);
|
const { validForm } = useFormValid(formRef);
|
||||||
|
Loading…
Reference in New Issue
Block a user