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",
|
||||
component: "Layout",
|
||||
@@ -306,32 +319,6 @@ export default defineMock([
|
||||
params: null,
|
||||
},
|
||||
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",
|
||||
component: "demo/table/vxe-table/index",
|
||||
@@ -1726,62 +1713,45 @@ export default defineMock([
|
||||
{
|
||||
id: "403",
|
||||
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: "表格组件",
|
||||
type: "C",
|
||||
routeName: "",
|
||||
routePath: "table",
|
||||
component: "Layout",
|
||||
externalUrl: null,
|
||||
sort: 3,
|
||||
sort: 4,
|
||||
visible: 1,
|
||||
icon: "el-icon-Grid",
|
||||
redirect: "",
|
||||
perm: null,
|
||||
children: [
|
||||
{
|
||||
id: "40301",
|
||||
parentId: "403",
|
||||
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",
|
||||
id: "40401",
|
||||
parentId: "404",
|
||||
name: "VxeTable",
|
||||
type: "M",
|
||||
routeName: "VxeTable",
|
||||
routePath: "vxe-table",
|
||||
component: "demo/table/vxe-table/index",
|
||||
externalUrl: null,
|
||||
sort: 3,
|
||||
sort: 1,
|
||||
visible: 1,
|
||||
icon: "el-icon-MagicStick",
|
||||
redirect: "",
|
||||
@@ -1790,15 +1760,15 @@ export default defineMock([
|
||||
children: [],
|
||||
},
|
||||
{
|
||||
id: "40304",
|
||||
parentId: "403",
|
||||
id: "40402",
|
||||
parentId: "404",
|
||||
name: "自适应表格操作列",
|
||||
type: "M",
|
||||
routeName: "AutoOperationColumn",
|
||||
routePath: "operation-column",
|
||||
component: "demo/table/auto-operation-column",
|
||||
externalUrl: null,
|
||||
sort: 4,
|
||||
sort: 2,
|
||||
visible: 1,
|
||||
icon: "",
|
||||
redirect: "",
|
||||
@@ -2595,12 +2565,14 @@ export default defineMock([
|
||||
},
|
||||
{
|
||||
value: "403",
|
||||
label: "CRUD 示例",
|
||||
},
|
||||
{
|
||||
value: "404",
|
||||
label: "表格组件",
|
||||
children: [
|
||||
{ value: "40301", label: "增删改查" },
|
||||
{ value: "40302", label: "CRUD单文件" },
|
||||
{ value: "40303", label: "VxeTable" },
|
||||
{ value: "40304", label: "自适应表格操作列" },
|
||||
{ value: "40401", label: "VxeTable" },
|
||||
{ value: "40402", label: "自适应表格操作列" },
|
||||
],
|
||||
},
|
||||
],
|
||||
@@ -3068,6 +3040,22 @@ const menuMap: Record<string, any> = {
|
||||
403: {
|
||||
id: "403",
|
||||
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: "表格组件",
|
||||
type: "C",
|
||||
routeName: "",
|
||||
@@ -3076,7 +3064,7 @@ const menuMap: Record<string, any> = {
|
||||
externalUrl: null,
|
||||
perm: null,
|
||||
visible: 1,
|
||||
sort: 3,
|
||||
sort: 4,
|
||||
icon: "el-icon-Grid",
|
||||
redirect: "",
|
||||
keepAlive: null,
|
||||
@@ -4105,41 +4093,9 @@ const menuMap: Record<string, any> = {
|
||||
redirect: "",
|
||||
keepAlive: 1,
|
||||
},
|
||||
40301: {
|
||||
id: "40301",
|
||||
parentId: "403",
|
||||
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",
|
||||
40401: {
|
||||
id: "40401",
|
||||
parentId: "404",
|
||||
name: "VxeTable",
|
||||
type: "M",
|
||||
routeName: "VxeTable",
|
||||
@@ -4148,14 +4104,14 @@ const menuMap: Record<string, any> = {
|
||||
externalUrl: null,
|
||||
perm: null,
|
||||
visible: 1,
|
||||
sort: 3,
|
||||
sort: 1,
|
||||
icon: "el-icon-MagicStick",
|
||||
redirect: "",
|
||||
keepAlive: 1,
|
||||
},
|
||||
40304: {
|
||||
id: "40304",
|
||||
parentId: "403",
|
||||
40402: {
|
||||
id: "40402",
|
||||
parentId: "404",
|
||||
name: "自适应表格操作列",
|
||||
type: "M",
|
||||
routeName: "AutoOperationColumn",
|
||||
@@ -4164,7 +4120,7 @@ const menuMap: Record<string, any> = {
|
||||
externalUrl: null,
|
||||
perm: null,
|
||||
visible: 1,
|
||||
sort: 4,
|
||||
sort: 2,
|
||||
icon: "",
|
||||
redirect: "",
|
||||
keepAlive: 1,
|
||||
|
||||
Reference in new issue
Block a user