fix: fix case sensitivity on Linux

This commit is contained in:
yangbit 2017-04-27 15:05:35 +08:00
parent 168150ff20
commit b112c6c86d
2 changed files with 133 additions and 143 deletions

View File

@ -26,11 +26,11 @@ const Tinymce = resolve => require(['../views/components/tinymce'], resolve);
const Markdown = resolve => require(['../views/components/markdown'], resolve); const Markdown = resolve => require(['../views/components/markdown'], resolve);
const JsonEditor = resolve => require(['../views/components/jsoneditor'], resolve); const JsonEditor = resolve => require(['../views/components/jsoneditor'], resolve);
const DndList = resolve => require(['../views/components/dndlist'], resolve); const DndList = resolve => require(['../views/components/dndlist'], resolve);
const AvatarUpload = resolve => require(['../views/components/avatarupload'], resolve); const AvatarUpload = resolve => require(['../views/components/avatarUpload'], resolve);
const Dropzone = resolve => require(['../views/components/dropzone'], resolve); const Dropzone = resolve => require(['../views/components/dropzone'], resolve);
const Sticky = resolve => require(['../views/components/sticky'], resolve); const Sticky = resolve => require(['../views/components/sticky'], resolve);
const SplitPane = resolve => require(['../views/components/splitpane'], resolve); const SplitPane = resolve => require(['../views/components/splitpane'], resolve);
const CountTo = resolve => require(['../views/components/countto'], resolve); const CountTo = resolve => require(['../views/components/countTo'], resolve);
const Mixin = resolve => require(['../views/components/mixin'], resolve); const Mixin = resolve => require(['../views/components/mixin'], resolve);
@ -71,150 +71,140 @@ const Permission = resolve => require(['../views/permission/index'], resolve);
Vue.use(Router); Vue.use(Router);
export default new Router({ export default new Router({
// mode: 'history', //后端支持可开 // mode: 'history', //后端支持可开
scrollBehavior: () => ({ y: 0 }), scrollBehavior: () => ({ y: 0 }),
routes: [ routes: [
{ path: '/login', component: Login, hidden: true }, { path: '/login', component: Login, hidden: true },
{ path: '/authredirect', component: authRedirect, hidden: true }, { path: '/authredirect', component: authRedirect, hidden: true },
{ path: '/sendpwd', component: sendPWD, hidden: true }, { path: '/sendpwd', component: sendPWD, hidden: true },
{ path: '/reset', component: reset, hidden: true }, { path: '/reset', component: reset, hidden: true },
{ path: '/404', component: Err404, hidden: true }, { path: '/404', component: Err404, hidden: true },
{ path: '/401', component: Err401, hidden: true }, { path: '/401', component: Err401, hidden: true }, {
{ path: '/',
path: '/', component: Layout,
component: Layout, redirect: '/dashboard',
redirect: '/dashboard', name: '首页',
name: '首页', hidden: true,
hidden: true, children: [{ path: 'dashboard', component: dashboard }]
children: [{ path: 'dashboard', component: dashboard }] }, {
}, path: '/introduction',
{ component: Layout,
path: '/introduction', redirect: '/introduction/index',
component: Layout, name: '简述',
redirect: '/introduction/index', icon: 'xinrenzhinan',
name: '简述', noDropdown: true,
icon: 'xinrenzhinan', children: [
noDropdown: true, { path: 'index', component: Introduction, name: '简述' }
children: [ ]
{ path: 'index', component: Introduction, name: '简述' } }, {
] path: '/permission',
}, component: Layout,
{ redirect: '/permission/index',
path: '/permission', name: '权限测试',
component: Layout, icon: 'quanxian',
redirect: '/permission/index', meta: { role: ['admin'] },
name: '权限测试', noDropdown: true,
icon: 'quanxian', children: [
meta: { role: ['admin'] }, { path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } }
noDropdown: true, ]
children: [ }, {
{ path: 'index', component: Permission, name: '权限测试页', meta: { role: ['admin'] } } path: '/components',
] component: Layout,
}, redirect: '/components/index',
{ name: '组件',
path: '/components', icon: 'zujian',
component: Layout, children: [
redirect: '/components/index', { path: 'index', component: componentsIndex, name: '介绍 ' },
name: '组件', { path: 'tinymce', component: Tinymce, name: '富文本编辑器' },
icon: 'zujian', { path: 'markdown', component: Markdown, name: 'Markdown' },
children: [ { path: 'jsoneditor', component: JsonEditor, name: 'JSON编辑器' },
{ path: 'index', component: componentsIndex, name: '介绍 ' }, { path: 'dndlist', component: DndList, name: '列表拖拽' },
{ path: 'tinymce', component: Tinymce, name: '富文本编辑器' }, { path: 'splitpane', component: SplitPane, name: 'SplitPane' },
{ path: 'markdown', component: Markdown, name: 'Markdown' }, { path: 'avatarupload', component: AvatarUpload, name: '头像上传' },
{ path: 'jsoneditor', component: JsonEditor, name: 'JSON编辑器' }, { path: 'dropzone', component: Dropzone, name: 'Dropzone' },
{ path: 'dndlist', component: DndList, name: '列表拖拽' }, { path: 'sticky', component: Sticky, name: 'Sticky' },
{ path: 'splitpane', component: SplitPane, name: 'SplitPane' }, { path: 'countto', component: CountTo, name: 'CountTo' },
{ path: 'avatarupload', component: AvatarUpload, name: '头像上传' }, { path: 'mixin', component: Mixin, name: '小组件' }
{ path: 'dropzone', component: Dropzone, name: 'Dropzone' }, ]
{ path: 'sticky', component: Sticky, name: 'Sticky' }, }, {
{ path: 'countto', component: CountTo, name: 'CountTo' }, path: '/charts',
{ path: 'mixin', component: Mixin, name: '小组件' } component: Layout,
] redirect: '/charts/index',
}, name: '图表',
{ icon: 'tubiaoleixingzhengchang',
path: '/charts', children: [
component: Layout, { path: 'index', component: chartIndex, name: '介绍' },
redirect: '/charts/index', { path: 'keyboard', component: KeyboardChart, name: '键盘图表' },
name: '图表', { path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' },
icon: 'tubiaoleixingzhengchang', { path: 'line', component: LineMarker, name: '折线图' },
children: [ { path: 'mixchart', component: MixChart, name: '混合图表' }
{ path: 'index', component: chartIndex, name: '介绍' }, ]
{ path: 'keyboard', component: KeyboardChart, name: '键盘图表' }, }, {
{ path: 'keyboard2', component: KeyboardChart2, name: '键盘图表2' }, path: '/errorpage',
{ path: 'line', component: LineMarker, name: '折线图' }, component: Layout,
{ path: 'mixchart', component: MixChart, name: '混合图表' } redirect: 'noredirect',
] name: '错误页面',
}, icon: '404',
{ children: [
path: '/errorpage', { path: '401', component: Err401, name: '401' },
component: Layout, { path: '404', component: Err404, name: '404' }
redirect: 'noredirect', ]
name: '错误页面', }, {
icon: '404', path: '/errlog',
children: [ component: Layout,
{ path: '401', component: Err401, name: '401' }, redirect: 'noredirect',
{ path: '404', component: Err404, name: '404' } name: 'errlog',
] icon: 'bug',
}, noDropdown: true,
{ children: [
path: '/errlog', { path: 'log', component: ErrorLog, name: '错误日志' }
component: Layout, ]
redirect: 'noredirect', }, {
name: 'errlog', path: '/excel',
icon: 'bug', component: Layout,
noDropdown: true, redirect: 'noredirect',
children: [ name: 'excel',
{ path: 'log', component: ErrorLog, name: '错误日志' } icon: 'EXCEL',
] noDropdown: true,
}, children: [
{ { path: 'download', component: ExcelDownload, name: '导出excel' }
path: '/excel', ]
component: Layout, }, {
redirect: 'noredirect', path: '/theme',
name: 'excel', component: Layout,
icon: 'EXCEL', redirect: 'noredirect',
noDropdown: true, name: 'theme',
children: [ icon: 'theme',
{ path: 'download', component: ExcelDownload, name: '导出excel' } noDropdown: true,
] children: [
}, { path: 'index', component: Theme, name: '换肤' }
{ ]
path: '/theme', }, {
component: Layout, path: '/example',
redirect: 'noredirect', component: Layout,
name: 'theme', redirect: 'noredirect',
icon: 'theme', name: '综合实例',
noDropdown: true, icon: 'zonghe',
children: [ children: [
{ path: 'index', component: Theme, name: '换肤' } { path: 'dynamictable', component: DynamicTable, name: '动态table' },
] { path: 'table', component: Table, name: '综合table' },
}, { path: 'form1', component: Form1, name: '综合form1' }
{ // { path: 'form2', component: Form2, name: '综合form2' }
path: '/example', ]
component: Layout, },
redirect: 'noredirect', // {
name: '综合实例', // path: '/admin',
icon: 'zonghe', // component: Layout,
children: [ // redirect: 'noredirect',
{ path: 'dynamictable', component: DynamicTable, name: '动态table' }, // name: '后台管理',
{ path: 'table', component: Table, name: '综合table' }, // icon: 'geren1',
{ path: 'form1', component: Form1, name: '综合form1' } // children: [
// { path: 'form2', component: Form2, name: '综合form2' } // { path: 'createuser', component: AdminCreateUser, name: '管理员', meta: { role: ['admin'] } },
] // { path: 'list', component: UsersList, name: '后台用户列表', meta: { role: ['super_editor', 'product', 'author_assistant'] } },
}, // { path: 'qicklyCreate', component: QuicklyCreateUser, name: '一键创建账户', meta: { role: ['super_editor', 'gold_editor', 'weex_editor', 'wscn_editor', 'author_assistant', 'product'] } },
// { // { path: 'profile', component: UserProfile, name: '个人' }
// path: '/admin', // ]
// component: Layout, // },
// redirect: 'noredirect', { path: '*', redirect: '/404', hidden: true }
// name: '后台管理', ]
// icon: 'geren1',
// children: [
// { path: 'createuser', component: AdminCreateUser, name: '管理员', meta: { role: ['admin'] } },
// { path: 'list', component: UsersList, name: '后台用户列表', meta: { role: ['super_editor', 'product', 'author_assistant'] } },
// { path: 'qicklyCreate', component: QuicklyCreateUser, name: '一键创建账户', meta: { role: ['super_editor', 'gold_editor', 'weex_editor', 'wscn_editor', 'author_assistant', 'product'] } },
// { path: 'profile', component: UserProfile, name: '个人' }
// ]
// },
{ path: '*', redirect: '/404', hidden: true }
]
}); });