refactor(menu): 通用组件菜单收敛为 CRUD 示例与表格组件
- 路由树、菜单列表、下拉选项与详情映射改用 403/404 编号 - 去掉重复的 CRUD 单文件入口
This commit is contained in:
1 parent
fc9f4dd757
commit
301f0ab983
1 file changed
+68
-112
+68
-112
@@ -294,6 +294,19 @@ export default defineMock([
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: "crud",
|
||||||
|
component: "demo/crud/index",
|
||||||
|
redirect: "",
|
||||||
|
name: "CrudDemo",
|
||||||
|
meta: {
|
||||||
|
title: "CRUD 示例",
|
||||||
|
icon: "el-icon-Document",
|
||||||
|
hidden: false,
|
||||||
|
keepAlive: true,
|
||||||
|
params: null,
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: "table",
|
path: "table",
|
||||||
component: "Layout",
|
component: "Layout",
|
||||||
@@ -306,32 +319,6 @@ export default defineMock([
|
|||||||
params: null,
|
params: null,
|
||||||
},
|
},
|
||||||
children: [
|
children: [
|
||||||
{
|
|
||||||
path: "crud",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
redirect: "",
|
|
||||||
name: "Crud",
|
|
||||||
meta: {
|
|
||||||
title: "增删改查",
|
|
||||||
icon: "",
|
|
||||||
hidden: false,
|
|
||||||
keepAlive: true,
|
|
||||||
params: null,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: "crud-single",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
redirect: "",
|
|
||||||
name: "CrudSingle",
|
|
||||||
meta: {
|
|
||||||
title: "CRUD单文件",
|
|
||||||
icon: "el-icon-Reading",
|
|
||||||
hidden: false,
|
|
||||||
keepAlive: true,
|
|
||||||
params: null,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: "vxe-table",
|
path: "vxe-table",
|
||||||
component: "demo/table/vxe-table/index",
|
component: "demo/table/vxe-table/index",
|
||||||
@@ -1726,62 +1713,45 @@ export default defineMock([
|
|||||||
{
|
{
|
||||||
id: "403",
|
id: "403",
|
||||||
parentId: "4",
|
parentId: "4",
|
||||||
|
name: "CRUD 示例",
|
||||||
|
type: "M",
|
||||||
|
routeName: "CrudDemo",
|
||||||
|
routePath: "crud",
|
||||||
|
component: "demo/crud/index",
|
||||||
|
externalUrl: null,
|
||||||
|
sort: 3,
|
||||||
|
visible: 1,
|
||||||
|
icon: "el-icon-Document",
|
||||||
|
redirect: "",
|
||||||
|
perm: null,
|
||||||
|
keepAlive: 1,
|
||||||
|
children: [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "404",
|
||||||
|
parentId: "4",
|
||||||
name: "表格组件",
|
name: "表格组件",
|
||||||
type: "C",
|
type: "C",
|
||||||
routeName: "",
|
routeName: "",
|
||||||
routePath: "table",
|
routePath: "table",
|
||||||
component: "Layout",
|
component: "Layout",
|
||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
sort: 3,
|
sort: 4,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
icon: "el-icon-Grid",
|
icon: "el-icon-Grid",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
perm: null,
|
perm: null,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
id: "40301",
|
id: "40401",
|
||||||
parentId: "403",
|
parentId: "404",
|
||||||
name: "增删改查",
|
|
||||||
type: "M",
|
|
||||||
routeName: "Crud",
|
|
||||||
routePath: "crud",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
externalUrl: null,
|
|
||||||
sort: 1,
|
|
||||||
visible: 1,
|
|
||||||
icon: "",
|
|
||||||
redirect: "",
|
|
||||||
perm: null,
|
|
||||||
keepAlive: 1,
|
|
||||||
children: [],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "40302",
|
|
||||||
parentId: "403",
|
|
||||||
name: "CRUD单文件",
|
|
||||||
type: "M",
|
|
||||||
routeName: "CrudSingle",
|
|
||||||
routePath: "crud-single",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
externalUrl: null,
|
|
||||||
sort: 2,
|
|
||||||
visible: 1,
|
|
||||||
icon: "el-icon-Reading",
|
|
||||||
redirect: "",
|
|
||||||
perm: null,
|
|
||||||
keepAlive: 1,
|
|
||||||
children: [],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: "40303",
|
|
||||||
parentId: "403",
|
|
||||||
name: "VxeTable",
|
name: "VxeTable",
|
||||||
type: "M",
|
type: "M",
|
||||||
routeName: "VxeTable",
|
routeName: "VxeTable",
|
||||||
routePath: "vxe-table",
|
routePath: "vxe-table",
|
||||||
component: "demo/table/vxe-table/index",
|
component: "demo/table/vxe-table/index",
|
||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
sort: 3,
|
sort: 1,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
icon: "el-icon-MagicStick",
|
icon: "el-icon-MagicStick",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
@@ -1790,15 +1760,15 @@ export default defineMock([
|
|||||||
children: [],
|
children: [],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "40304",
|
id: "40402",
|
||||||
parentId: "403",
|
parentId: "404",
|
||||||
name: "自适应表格操作列",
|
name: "自适应表格操作列",
|
||||||
type: "M",
|
type: "M",
|
||||||
routeName: "AutoOperationColumn",
|
routeName: "AutoOperationColumn",
|
||||||
routePath: "operation-column",
|
routePath: "operation-column",
|
||||||
component: "demo/table/auto-operation-column",
|
component: "demo/table/auto-operation-column",
|
||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
sort: 4,
|
sort: 2,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
icon: "",
|
icon: "",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
@@ -2595,12 +2565,14 @@ export default defineMock([
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: "403",
|
value: "403",
|
||||||
|
label: "CRUD 示例",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: "404",
|
||||||
label: "表格组件",
|
label: "表格组件",
|
||||||
children: [
|
children: [
|
||||||
{ value: "40301", label: "增删改查" },
|
{ value: "40401", label: "VxeTable" },
|
||||||
{ value: "40302", label: "CRUD单文件" },
|
{ value: "40402", label: "自适应表格操作列" },
|
||||||
{ value: "40303", label: "VxeTable" },
|
|
||||||
{ value: "40304", label: "自适应表格操作列" },
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
@@ -3068,6 +3040,22 @@ const menuMap: Record<string, any> = {
|
|||||||
403: {
|
403: {
|
||||||
id: "403",
|
id: "403",
|
||||||
parentId: "4",
|
parentId: "4",
|
||||||
|
name: "CRUD 示例",
|
||||||
|
type: "M",
|
||||||
|
routeName: "CrudDemo",
|
||||||
|
routePath: "crud",
|
||||||
|
component: "demo/crud/index",
|
||||||
|
externalUrl: null,
|
||||||
|
perm: null,
|
||||||
|
visible: 1,
|
||||||
|
sort: 3,
|
||||||
|
icon: "el-icon-Document",
|
||||||
|
redirect: "",
|
||||||
|
keepAlive: 1,
|
||||||
|
},
|
||||||
|
404: {
|
||||||
|
id: "404",
|
||||||
|
parentId: "4",
|
||||||
name: "表格组件",
|
name: "表格组件",
|
||||||
type: "C",
|
type: "C",
|
||||||
routeName: "",
|
routeName: "",
|
||||||
@@ -3076,7 +3064,7 @@ const menuMap: Record<string, any> = {
|
|||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
perm: null,
|
perm: null,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
sort: 3,
|
sort: 4,
|
||||||
icon: "el-icon-Grid",
|
icon: "el-icon-Grid",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
keepAlive: null,
|
keepAlive: null,
|
||||||
@@ -4105,41 +4093,9 @@ const menuMap: Record<string, any> = {
|
|||||||
redirect: "",
|
redirect: "",
|
||||||
keepAlive: 1,
|
keepAlive: 1,
|
||||||
},
|
},
|
||||||
40301: {
|
40401: {
|
||||||
id: "40301",
|
id: "40401",
|
||||||
parentId: "403",
|
parentId: "404",
|
||||||
name: "增删改查",
|
|
||||||
type: "M",
|
|
||||||
routeName: "Crud",
|
|
||||||
routePath: "crud",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
externalUrl: null,
|
|
||||||
perm: null,
|
|
||||||
visible: 1,
|
|
||||||
sort: 1,
|
|
||||||
icon: "",
|
|
||||||
redirect: "",
|
|
||||||
keepAlive: 1,
|
|
||||||
},
|
|
||||||
40302: {
|
|
||||||
id: "40302",
|
|
||||||
parentId: "403",
|
|
||||||
name: "CRUD单文件",
|
|
||||||
type: "M",
|
|
||||||
routeName: "CrudSingle",
|
|
||||||
routePath: "crud-single",
|
|
||||||
component: "demo/crud/index",
|
|
||||||
externalUrl: null,
|
|
||||||
perm: null,
|
|
||||||
visible: 1,
|
|
||||||
sort: 2,
|
|
||||||
icon: "el-icon-Reading",
|
|
||||||
redirect: "",
|
|
||||||
keepAlive: 1,
|
|
||||||
},
|
|
||||||
40303: {
|
|
||||||
id: "40303",
|
|
||||||
parentId: "403",
|
|
||||||
name: "VxeTable",
|
name: "VxeTable",
|
||||||
type: "M",
|
type: "M",
|
||||||
routeName: "VxeTable",
|
routeName: "VxeTable",
|
||||||
@@ -4148,14 +4104,14 @@ const menuMap: Record<string, any> = {
|
|||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
perm: null,
|
perm: null,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
sort: 3,
|
sort: 1,
|
||||||
icon: "el-icon-MagicStick",
|
icon: "el-icon-MagicStick",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
keepAlive: 1,
|
keepAlive: 1,
|
||||||
},
|
},
|
||||||
40304: {
|
40402: {
|
||||||
id: "40304",
|
id: "40402",
|
||||||
parentId: "403",
|
parentId: "404",
|
||||||
name: "自适应表格操作列",
|
name: "自适应表格操作列",
|
||||||
type: "M",
|
type: "M",
|
||||||
routeName: "AutoOperationColumn",
|
routeName: "AutoOperationColumn",
|
||||||
@@ -4164,7 +4120,7 @@ const menuMap: Record<string, any> = {
|
|||||||
externalUrl: null,
|
externalUrl: null,
|
||||||
perm: null,
|
perm: null,
|
||||||
visible: 1,
|
visible: 1,
|
||||||
sort: 4,
|
sort: 2,
|
||||||
icon: "",
|
icon: "",
|
||||||
redirect: "",
|
redirect: "",
|
||||||
keepAlive: 1,
|
keepAlive: 1,
|
||||||
|
|||||||
Reference in new issue
Block a user