From d44d6a554882464c7b338d3e880e2cc0be88019a Mon Sep 17 00:00:00 2001 From: Book Pauk Date: Thu, 3 Jan 2019 18:10:43 +0700 Subject: [PATCH] =?UTF-8?q?=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D1=8B=20=D0=B7=D0=B0=D0=B3=D0=BE=D1=82=D0=BE=D0=B2=D0=BA?= =?UTF-8?q?=D0=B8=20=D0=BA=D0=BE=D0=BC=D0=BF=D0=BE=D0=BD=D0=B5=D0=BD=D1=82?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B4=D0=BB=D1=8F=20=D1=82=D0=B0=D0=B1=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=82=D0=B5=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/components/CardIndex/Book/Book.vue | 20 ++++++++++ client/components/CardIndex/Card/Card.vue | 20 ++++++++++ client/components/CardIndex/CardIndex.vue | 39 ++++++++++++++++--- .../components/CardIndex/History/History.vue | 20 ++++++++++ client/router.js | 11 ++++-- 5 files changed, 102 insertions(+), 8 deletions(-) create mode 100644 client/components/CardIndex/Book/Book.vue create mode 100644 client/components/CardIndex/Card/Card.vue create mode 100644 client/components/CardIndex/History/History.vue diff --git a/client/components/CardIndex/Book/Book.vue b/client/components/CardIndex/Book/Book.vue new file mode 100644 index 00000000..2bfe4c5c --- /dev/null +++ b/client/components/CardIndex/Book/Book.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/components/CardIndex/Card/Card.vue b/client/components/CardIndex/Card/Card.vue new file mode 100644 index 00000000..2b0b72b5 --- /dev/null +++ b/client/components/CardIndex/Card/Card.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/components/CardIndex/CardIndex.vue b/client/components/CardIndex/CardIndex.vue index 02a6a9a1..9abfd5dc 100644 --- a/client/components/CardIndex/CardIndex.vue +++ b/client/components/CardIndex/CardIndex.vue @@ -1,7 +1,20 @@ @@ -9,10 +22,29 @@ //----------------------------------------------------------------------------- import Vue from 'vue'; import Component from 'vue-class-component'; +import Search from './Search/Search.vue'; +import Card from './Card/Card.vue'; +import Book from './Book/Book.vue'; +import History from './History/History.vue'; export default @Component({ + components: { + Search, Card, Book, History + }, + watch: { + selectedTab: function(newValue, oldValue) { + switch (newValue) { + case '0': this.$router.push('/cardindex/search'); break; + case '1': this.$router.push('/cardindex/card'); break; + case '2': this.$router.push('/cardindex/book'); break; + case '3': this.$router.push('/cardindex/history'); break; + } + }, + }, }) class CardIndex extends Vue { + selectedTab = null; + created() { } @@ -21,7 +53,4 @@ class CardIndex extends Vue { \ No newline at end of file diff --git a/client/components/CardIndex/History/History.vue b/client/components/CardIndex/History/History.vue new file mode 100644 index 00000000..91ecd6cc --- /dev/null +++ b/client/components/CardIndex/History/History.vue @@ -0,0 +1,20 @@ + + + diff --git a/client/router.js b/client/router.js index c8241554..0f177bb1 100644 --- a/client/router.js +++ b/client/router.js @@ -15,9 +15,14 @@ import NotFound404 from './components/NotFound404/NotFound404.vue'; const myRoutes = [ ['/', null, null, '/cardindex'], - ['/cardindex', CardIndex, null, '/cardindex/search' ], - ['/cardindex~search', Search ], - //['/cardindex~card/:authorId', CardIndex ], + ['/cardindex', CardIndex ], + ['/cardindex/search', CardIndex ], + ['/cardindex/card', CardIndex ], + ['/cardindex/card/:authorId', CardIndex ], + ['/cardindex/book', CardIndex ], + ['/cardindex/book/:bookId', CardIndex ], + ['/cardindex/history', CardIndex ], + ['/reader', Reader ], ['/income', Income ], ['/sources', Sources ],