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 ],