Skip to content

Commit e65dfd3

Browse files
committed
refine code && rm code
1 parent cd47007 commit e65dfd3

File tree

6 files changed

+104
-935
lines changed

6 files changed

+104
-935
lines changed

src/router/index.js

Lines changed: 104 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -56,57 +56,63 @@ const Table = resolve => require(['../views/example/table'], resolve);
5656
const DragTable = resolve => require(['../views/example/dragTable'], resolve);
5757
const InlineEditTable = resolve => require(['../views/example/inlineEditTable'], resolve);
5858
const Form1 = resolve => require(['../views/example/form1'], resolve);
59-
// const Form2 = resolve => require(['../views/example/form2'], resolve);
6059

6160
/* permission */
6261
const Permission = resolve => require(['../views/permission/index'], resolve);
6362

6463

6564
Vue.use(Router);
6665

66+
/**
67+
* icon :the icon show in the sidebar
68+
* hidden: if hiddenLtrue will not show in the sidebar
69+
* redirect :if redirect:noredirect will not redirct in the levelbar
70+
* noDropdown : if noDropdown:true will not has submenu
71+
* meta: { role: ['admin'] } will control the page role
72+
*/
6773
export default new Router({
6874
// mode: 'history', //后端支持可开
6975
scrollBehavior: () => ({ y: 0 }),
7076
routes: [
71-
{ path: '/login', component: Login, hidden: true },
72-
{ path: '/authredirect', component: authRedirect, hidden: true },
73-
{ path: '/sendpwd', component: sendPWD, hidden: true },
74-
{ path: '/reset', component: reset, hidden: true },
75-
{ path: '/404', component: Err404, hidden: true },
76-
{ path: '/401', component: Err401, hidden: true }, {
77-
path: '/',
78-
component: Layout,
79-
redirect: '/dashboard',
80-
name: '首页',
81-
hidden: true,
82-
children: [{ path: 'dashboard', component: dashboard }]
83-
}, {
84-
path: '/introduction',
85-
component: Layout,
86-
redirect: '/introduction/index',
87-
icon: 'xinrenzhinan',
88-
noDropdown: true,
89-
children: [
90-
{ path: 'index', component: Introduction, name: '简述' }
91-
]
92-
}, {
93-
path: '/permission',
94-
component: Layout,
95-
redirect: '/permission/index',
96-
name: '权限测试',
97-
icon: 'quanxian',
98-
meta: { role: ['admin'] },
99-
noDropdown: true,
100-
children: [
101-
{ path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } }
102-
]
103-
}, {
104-
path: '/components',
105-
component: Layout,
106-
redirect: '/components/index',
107-
name: '组件',
108-
icon: 'zujian',
109-
children: [
77+
{ path: '/login', component: Login, hidden: true },
78+
{ path: '/authredirect', component: authRedirect, hidden: true },
79+
{ path: '/sendpwd', component: sendPWD, hidden: true },
80+
{ path: '/reset', component: reset, hidden: true },
81+
{ path: '/404', component: Err404, hidden: true },
82+
{ path: '/401', component: Err401, hidden: true },
83+
{
84+
path: '/',
85+
component: Layout,
86+
redirect: '/dashboard',
87+
name: '首页',
88+
hidden: true,
89+
children: [{ path: 'dashboard', component: dashboard }]
90+
},
91+
{
92+
path: '/introduction',
93+
component: Layout,
94+
redirect: '/introduction/index',
95+
icon: 'xinrenzhinan',
96+
noDropdown: true,
97+
children: [{ path: 'index', component: Introduction, name: '简述' }]
98+
},
99+
{
100+
path: '/permission',
101+
component: Layout,
102+
redirect: '/permission/index',
103+
name: '权限测试',
104+
icon: 'quanxian',
105+
meta: { role: ['admin'] },
106+
noDropdown: true,
107+
children: [{ path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } }]
108+
},
109+
{
110+
path: '/components',
111+
component: Layout,
112+
redirect: '/components/index',
113+
name: '组件',
114+
icon: 'zujian',
115+
children: [
110116
{ path: 'index', component: componentsIndex, name: '介绍 ' },
111117
{ path: 'tinymce', component: Tinymce, name: '富文本编辑器' },
112118
{ path: 'markdown', component: Markdown, name: 'Markdown' },
@@ -118,88 +124,75 @@ export default new Router({
118124
{ path: 'sticky', component: Sticky, name: 'Sticky' },
119125
{ path: 'countto', component: CountTo, name: 'CountTo' },
120126
{ path: 'mixin', component: Mixin, name: '小组件' }
121-
]
122-
}, {
123-
path: '/charts',
124-
component: Layout,
125-
redirect: '/charts/index',
126-
name: '图表',
127-
icon: 'tubiaoleixingzhengchang',
128-
children: [
127+
]
128+
},
129+
{
130+
path: '/charts',
131+
component: Layout,
132+
redirect: '/charts/index',
133+
name: '图表',
134+
icon: 'tubiaoleixingzhengchang',
135+
children: [
129136
{ path: 'index', component: chartIndex, name: '介绍' },
130137
{ path: 'keyboard', component: KeyboardChart, name: '键盘图表' },
131138
{ path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' },
132139
{ path: 'line', component: LineMarker, name: '折线图' },
133140
{ path: 'mixchart', component: MixChart, name: '混合图表' }
134-
]
135-
}, {
136-
path: '/errorpage',
137-
component: Layout,
138-
redirect: 'noredirect',
139-
name: '错误页面',
140-
icon: '404',
141-
children: [
141+
]
142+
},
143+
{
144+
path: '/errorpage',
145+
component: Layout,
146+
redirect: 'noredirect',
147+
name: '错误页面',
148+
icon: '404',
149+
children: [
142150
{ path: '401', component: Err401, name: '401' },
143151
{ path: '404', component: Err404, name: '404' }
144-
]
145-
}, {
146-
path: '/errlog',
147-
component: Layout,
148-
redirect: 'noredirect',
149-
name: 'errlog',
150-
icon: 'bug',
151-
noDropdown: true,
152-
children: [
153-
{ path: 'log', component: ErrorLog, name: '错误日志' }
154-
]
155-
}, {
156-
path: '/excel',
157-
component: Layout,
158-
redirect: 'noredirect',
159-
name: 'excel',
160-
icon: 'EXCEL',
161-
noDropdown: true,
162-
children: [
163-
{ path: 'download', component: ExcelDownload, name: '导出excel' }
164-
]
165-
}, {
166-
path: '/theme',
167-
component: Layout,
168-
redirect: 'noredirect',
169-
name: 'theme',
170-
icon: 'theme',
171-
noDropdown: true,
172-
children: [
173-
{ path: 'index', component: Theme, name: '换肤' }
174-
]
175-
}, {
176-
path: '/example',
177-
component: Layout,
178-
redirect: 'noredirect',
179-
name: '综合实例',
180-
icon: 'zonghe',
181-
children: [
152+
]
153+
},
154+
{
155+
path: '/errlog',
156+
component: Layout,
157+
redirect: 'noredirect',
158+
name: 'errlog',
159+
icon: 'bug',
160+
noDropdown: true,
161+
children: [{ path: 'log', component: ErrorLog, name: '错误日志' }]
162+
},
163+
{
164+
path: '/excel',
165+
component: Layout,
166+
redirect: 'noredirect',
167+
name: 'excel',
168+
icon: 'EXCEL',
169+
noDropdown: true,
170+
children: [{ path: 'download', component: ExcelDownload, name: '导出excel' }]
171+
},
172+
{
173+
path: '/theme',
174+
component: Layout,
175+
redirect: 'noredirect',
176+
name: 'theme',
177+
icon: 'theme',
178+
noDropdown: true,
179+
children: [{ path: 'index', component: Theme, name: '换肤' }]
180+
},
181+
{
182+
path: '/example',
183+
component: Layout,
184+
redirect: 'noredirect',
185+
name: '综合实例',
186+
icon: 'zonghe',
187+
children: [
182188
{ path: 'dynamictable', component: DynamicTable, name: '动态table' },
183189
{ path: 'dragtable', component: DragTable, name: '拖拽table' },
184190
{ path: 'inline_edit_table', component: InlineEditTable, name: 'table内编辑' },
185191
{ path: 'table', component: Table, name: '综合table' },
186192
{ path: 'form1', component: Form1, name: '综合form1' }
187-
// { path: 'form2', component: Form2, name: '综合form2' }
188-
]
189-
},
190-
// {
191-
// path: '/admin',
192-
// component: Layout,
193-
// redirect: 'noredirect',
194-
// name: '后台管理',
195-
// icon: 'geren1',
196-
// children: [
197-
// { path: 'createuser', component: AdminCreateUser, name: '管理员', meta: { role: ['admin'] } },
198-
// { path: 'list', component: UsersList, name: '后台用户列表', meta: { role: ['super_editor', 'product', 'author_assistant'] } },
199-
// { path: 'qicklyCreate', component: QuicklyCreateUser, name: '一键创建账户', meta: { role: ['super_editor', 'gold_editor', 'weex_editor', 'wscn_editor', 'author_assistant', 'product'] } },
200-
// { path: 'profile', component: UserProfile, name: '个人' }
201-
// ]
202-
// },
203-
{ path: '*', redirect: '/404', hidden: true }
193+
]
194+
},
195+
196+
{ path: '*', redirect: '/404', hidden: true }
204197
]
205198
});

src/views/admin/createUser.vue

Lines changed: 0 additions & 87 deletions
This file was deleted.

0 commit comments

Comments
 (0)