From b8273bfc26c7472b34cb9731f10f24faa67c4619 Mon Sep 17 00:00:00 2001 From: jingsam Date: Mon, 31 Oct 2016 22:11:51 +0800 Subject: [PATCH] add a nav for test page --- test/app.vue | 33 +++++++ test/main.js | 50 +++++------ test/routers/{layout.vue => card.vue} | 0 test/routers/index.vue | 58 ------------ test/routers/{msg.vue => message.vue} | 0 test/routers/page.vue | 115 ++++++++---------------- test/routers/{notice.vue => poptip.vue} | 0 test/routers/{tag.vue => slider.vue} | 0 test/routers/step.vue | 97 ++++++++++++++++++++ 9 files changed, 193 insertions(+), 160 deletions(-) rename test/routers/{layout.vue => card.vue} (100%) delete mode 100644 test/routers/index.vue rename test/routers/{msg.vue => message.vue} (100%) rename test/routers/{notice.vue => poptip.vue} (100%) rename test/routers/{tag.vue => slider.vue} (100%) create mode 100644 test/routers/step.vue diff --git a/test/app.vue b/test/app.vue index 7c7fa7b6..fa60d96d 100644 --- a/test/app.vue +++ b/test/app.vue @@ -2,8 +2,41 @@ @import "../src/styles/index.less"; @import "../src/styles/package.less"; + diff --git a/test/main.js b/test/main.js index 01731bfc..f5ddd0b0 100644 --- a/test/main.js +++ b/test/main.js @@ -16,19 +16,19 @@ var router = new VueRouter({ }); router.map({ - '/index': { - component: function (resolve) { - require(['./routers/index.vue'], resolve); - } - }, '/button': { component: function (resolve) { require(['./routers/button.vue'], resolve); } }, - '/page': { + '/card': { component: function (resolve) { - require(['./routers/page.vue'], resolve); + require(['./routers/card.vue'], resolve); + } + }, + '/message': { + component: function (resolve) { + require(['./routers/message.vue'], resolve); } }, '/more': { @@ -36,9 +36,14 @@ router.map({ require(['./routers/more.vue'], resolve); } }, - '/layout': { + '/page': { component: function (resolve) { - require(['./routers/layout.vue'], resolve); + require(['./routers/page.vue'], resolve); + } + }, + '/poptip': { + component: function (resolve) { + require(['./routers/poptip.vue'], resolve); } }, '/radio': { @@ -46,25 +51,20 @@ router.map({ require(['./routers/radio.vue'], resolve); } }, - '/msg': { - component: function (resolve) { - require(['./routers/msg.vue'], resolve); - } - }, - '/notice': { - component: function (resolve) { - require(['./routers/notice.vue'], resolve); - } - }, - '/tag': { - component: function (resolve) { - require(['./routers/tag.vue'], resolve); - } - }, '/select': { component: function (resolve) { require(['./routers/select.vue'], resolve); } + }, + '/slider': { + component: function (resolve) { + require(['./routers/slider.vue'], resolve); + } + }, + '/step': { + component: function (resolve) { + require(['./routers/step.vue'], resolve); + } } }); @@ -77,6 +77,6 @@ router.afterEach(function (transition) { }); router.redirect({ - '*': "/index" + '*': "/button" }); router.start(App, '#app'); diff --git a/test/routers/layout.vue b/test/routers/card.vue similarity index 100% rename from test/routers/layout.vue rename to test/routers/card.vue diff --git a/test/routers/index.vue b/test/routers/index.vue deleted file mode 100644 index 6e69d396..00000000 --- a/test/routers/index.vue +++ /dev/null @@ -1,58 +0,0 @@ - - - diff --git a/test/routers/msg.vue b/test/routers/message.vue similarity index 100% rename from test/routers/msg.vue rename to test/routers/message.vue diff --git a/test/routers/page.vue b/test/routers/page.vue index aabb928e..6e69d396 100644 --- a/test/routers/page.vue +++ b/test/routers/page.vue @@ -2,95 +2,56 @@