Browse Source

导航改成动态加载

master
taylor 8 years ago
parent
commit
f38bc4c504
  1. 2
      dist/index.html
  2. 5
      dist/static/css/app.326249c09335ee9a39d0a8cc82adefc2.css
  3. 1
      dist/static/css/app.326249c09335ee9a39d0a8cc82adefc2.css.map
  4. 5
      dist/static/css/app.87b5e86aaa4916c38ca674639f9bb4da.css
  5. 1
      dist/static/css/app.87b5e86aaa4916c38ca674639f9bb4da.css.map
  6. 2
      dist/static/js/app.a3ee622f6b1fbd493663.js
  7. 1
      dist/static/js/app.a3ee622f6b1fbd493663.js.map
  8. 2
      dist/static/js/app.e5788efd3235bb13134e.js
  9. 1
      dist/static/js/app.e5788efd3235bb13134e.js.map
  10. 2
      dist/static/js/manifest.4cb585d36ff2dc44df6d.js
  11. 2
      dist/static/js/manifest.4cb585d36ff2dc44df6d.js.map
  12. 2
      dist/static/js/manifest.562ecea768214dcd146d.js
  13. 30
      dist/static/js/vendor.09905ea616c3c3614030.js
  14. 1
      dist/static/js/vendor.09905ea616c3c3614030.js.map
  15. 29
      dist/static/js/vendor.850a0ddecfd8bb1110ca.js
  16. 1
      dist/static/js/vendor.850a0ddecfd8bb1110ca.js.map
  17. 17
      src/components/Home.vue
  18. 16
      src/main.js

2
dist/index.html

@ -1 +1 @@
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue element admin</title><link href=/vueAdmin/dist/static/css/app.326249c09335ee9a39d0a8cc82adefc2.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/vueAdmin/dist/static/js/manifest.562ecea768214dcd146d.js></script><script type=text/javascript src=/vueAdmin/dist/static/js/vendor.850a0ddecfd8bb1110ca.js></script><script type=text/javascript src=/vueAdmin/dist/static/js/app.a3ee622f6b1fbd493663.js></script></body></html>
<!DOCTYPE html><html><head><meta charset=utf-8><title>vue element admin</title><link href=/vueAdmin/dist/static/css/app.87b5e86aaa4916c38ca674639f9bb4da.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=/vueAdmin/dist/static/js/manifest.4cb585d36ff2dc44df6d.js></script><script type=text/javascript src=/vueAdmin/dist/static/js/vendor.09905ea616c3c3614030.js></script><script type=text/javascript src=/vueAdmin/dist/static/js/app.e5788efd3235bb13134e.js></script></body></html>

5
dist/static/css/app.326249c09335ee9a39d0a8cc82adefc2.css
File diff suppressed because it is too large
View File

1
dist/static/css/app.326249c09335ee9a39d0a8cc82adefc2.css.map
File diff suppressed because it is too large
View File

5
dist/static/css/app.87b5e86aaa4916c38ca674639f9bb4da.css
File diff suppressed because it is too large
View File

1
dist/static/css/app.87b5e86aaa4916c38ca674639f9bb4da.css.map
File diff suppressed because it is too large
View File

2
dist/static/js/app.a3ee622f6b1fbd493663.js
File diff suppressed because it is too large
View File

1
dist/static/js/app.a3ee622f6b1fbd493663.js.map
File diff suppressed because it is too large
View File

2
dist/static/js/app.e5788efd3235bb13134e.js
File diff suppressed because it is too large
View File

1
dist/static/js/app.e5788efd3235bb13134e.js.map
File diff suppressed because it is too large
View File

2
dist/static/js/manifest.4cb585d36ff2dc44df6d.js

@ -0,0 +1,2 @@
!function(e){function t(n){if(r[n])return r[n].exports;var a=r[n]={exports:{},id:n,loaded:!1};return e[n].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}var n=window.webpackJsonp;window.webpackJsonp=function(c,o){for(var s,i,p=0,l=[];p<c.length;p++)i=c[p],a[i]&&l.push.apply(l,a[i]),a[i]=0;for(s in o)e[s]=o[s];for(n&&n(c,o);l.length;)l.shift().call(null,t);if(o[0])return r[0]=0,t(0)};var r={},a={0:0};t.e=function(e,n){if(0===a[e])return n.call(null,t);if(void 0!==a[e])a[e].push(n);else{a[e]=[n];var r=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.src=t.p+"static/js/"+e+"."+{1:"09905ea616c3c3614030",2:"e5788efd3235bb13134e"}[e]+".js",r.appendChild(c)}},t.m=e,t.c=r,t.p="/vueAdmin/dist/"}([]);
//# sourceMappingURL=manifest.4cb585d36ff2dc44df6d.js.map

2
dist/static/js/manifest.4cb585d36ff2dc44df6d.js.map
File diff suppressed because it is too large
View File

2
dist/static/js/manifest.562ecea768214dcd146d.js

@ -1,2 +0,0 @@
!function(e){function t(n){if(a[n])return a[n].exports;var r=a[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var n=window.webpackJsonp;window.webpackJsonp=function(c,o){for(var s,i,p=0,d=[];p<c.length;p++)i=c[p],r[i]&&d.push.apply(d,r[i]),r[i]=0;for(s in o)e[s]=o[s];for(n&&n(c,o);d.length;)d.shift().call(null,t);if(o[0])return a[0]=0,t(0)};var a={},r={0:0};t.e=function(e,n){if(0===r[e])return n.call(null,t);if(void 0!==r[e])r[e].push(n);else{r[e]=[n];var a=document.getElementsByTagName("head")[0],c=document.createElement("script");c.type="text/javascript",c.charset="utf-8",c.async=!0,c.src=t.p+"static/js/"+e+"."+{1:"850a0ddecfd8bb1110ca",2:"a3ee622f6b1fbd493663"}[e]+".js",a.appendChild(c)}},t.m=e,t.c=a,t.p="/vueAdmin/dist/"}([]);
//# sourceMappingURL=manifest.562ecea768214dcd146d.js.map

30
dist/static/js/vendor.09905ea616c3c3614030.js
File diff suppressed because it is too large
View File

1
dist/static/js/vendor.09905ea616c3c3614030.js.map
File diff suppressed because it is too large
View File

29
dist/static/js/vendor.850a0ddecfd8bb1110ca.js
File diff suppressed because it is too large
View File

1
dist/static/js/vendor.850a0ddecfd8bb1110ca.js.map
File diff suppressed because it is too large
View File

17
src/components/Home.vue

@ -15,7 +15,7 @@
<!--<el-col :span="4">-->
<aside style="width:230px;">
<h5 class="admin"><i class="fa fa-user" aria-hidden="true" style="margin-right:5px;"></i>欢迎系统管理员测试</h5>
<el-menu style="border-top: 1px solid #475669;" default-active="/table" class="el-menu-vertical-demo" @open="handleopen"
<!--<el-menu style="border-top: 1px solid #475669;" default-active="/table" class="el-menu-vertical-demo" @open="handleopen"
@close="handleclose" @select="handleselect" theme="dark" unique-opened router>
<el-submenu index="1">
<template slot="title"><i class="el-icon-message"></i>导航一</template>
@ -29,7 +29,16 @@
<el-menu-item index="/page5">选项5</el-menu-item>
</el-submenu>
<el-menu-item index="/page6"><i class="fa fa-line-chart"></i>导航三</el-menu-item>
</el-menu>-->
<el-menu style="border-top: 1px solid #475669;" default-active="/table" class="el-menu-vertical-demo" @open="handleopen"
@close="handleclose" @select="handleselect" theme="dark" unique-opened router>
<template v-for="(item,index) in $router.options.routes" v-if="!item.hidden">
<el-submenu :index="index+''" v-if="!item.leaf">
<template slot="title"><i :class="item.iconCls"></i>{{item.name}}</template>
<el-menu-item v-for="child in item.children" :index="child.path">{{child.name}}</el-menu-item>
</el-submenu>
<el-menu-item v-if="item.leaf&&item.children.length>0" :index="item.children[0].path"><i :class="item.iconCls"></i>{{item.children[0].name}}</el-menu-item>
</template>
</el-menu>
</aside>
<!--</el-col>-->
@ -40,8 +49,8 @@
<strong style="width:200px;float:left;color: #475669;">{{currentPathName}}</strong>
<el-breadcrumb separator="/" style="float:right;">
<el-breadcrumb-item :to="{ path: '/table' }">首页</el-breadcrumb-item>
<el-breadcrumb-item>{{currentPathNameParent}}</el-breadcrumb-item>
<el-breadcrumb-item>{{currentPathName}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="currentPathNameParent!=''">{{currentPathNameParent}}</el-breadcrumb-item>
<el-breadcrumb-item v-if="currentPathName!=''">{{currentPathName}}</el-breadcrumb-item>
</el-breadcrumb>
</el-col>
<el-col :span="24" style="background-color:#fff;box-sizing: border-box;">

16
src/main.js

@ -23,14 +23,19 @@ Vue.use(VueRouter)
Vue.use(Vuex)
const routes = [
{ path: '/login', component: Login },
{
path: '/login',
component: Login,
hidden: true//不显示在导航中
},
//{ path: '/main', component: Main },
{
path: '/',
component: Home,
name: '导航一',
iconCls: 'el-icon-message',//图标样式class
children: [
{ path: '/main', component: Main },
//{ path: '/main', component: Main },
{ path: '/table', component: Table, name: 'Table' },
{ path: '/form', component: Form, name: 'Form' },
{ path: '/page3', component: Page3, name: '页面3' },
@ -40,6 +45,7 @@ const routes = [
path: '/',
component: Home,
name: '导航二',
iconCls: 'fa fa-id-card-o',
children: [
{ path: '/page4', component: Page4, name: '页面4' },
{ path: '/page5', component: Page5, name: '页面5' }
@ -48,9 +54,11 @@ const routes = [
{
path: '/',
component: Home,
name: '导航三',
name: '',
iconCls: 'fa fa-line-chart',
leaf: true,//只有一个节点
children: [
{ path: '/page6', component: Page6, name: '' }
{ path: '/page6', component: Page6, name: '导航三' }
]
}
]

Loading…
Cancel
Save