From 5ef49bff5128ced5d21610c7948d66460f5c6ab0 Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Mon, 22 Apr 2019 15:20:03 -0700 Subject: [PATCH] vue make multipage app for catalog list --- cateditor/src/components/CatalogList.vue | 17 ++ cateditor/src/pages/editor/App.vue | 33 +++ cateditor/src/pages/editor/main.js | 14 ++ .../src/{ => pages/editor}/store/index.js | 44 +++- cateditor/src/{ => pages/list}/App.vue | 8 +- cateditor/src/{ => pages/list}/main.js | 2 +- cateditor/src/pages/list/store/index.js | 193 ++++++++++++++++++ cateditor/vue.config.js | 16 ++ templates/catalogedit/catalogedit.html | 2 +- templates/cataloglist/cataloglist.html | 30 ++- 10 files changed, 347 insertions(+), 12 deletions(-) create mode 100644 cateditor/src/components/CatalogList.vue create mode 100644 cateditor/src/pages/editor/App.vue create mode 100644 cateditor/src/pages/editor/main.js rename cateditor/src/{ => pages/editor}/store/index.js (72%) rename cateditor/src/{ => pages/list}/App.vue (65%) rename cateditor/src/{ => pages/list}/main.js (91%) create mode 100644 cateditor/src/pages/list/store/index.js diff --git a/cateditor/src/components/CatalogList.vue b/cateditor/src/components/CatalogList.vue new file mode 100644 index 0000000..d8eb937 --- /dev/null +++ b/cateditor/src/components/CatalogList.vue @@ -0,0 +1,17 @@ + + + + + diff --git a/cateditor/src/pages/editor/App.vue b/cateditor/src/pages/editor/App.vue new file mode 100644 index 0000000..26d8e04 --- /dev/null +++ b/cateditor/src/pages/editor/App.vue @@ -0,0 +1,33 @@ + + + + + diff --git a/cateditor/src/pages/editor/main.js b/cateditor/src/pages/editor/main.js new file mode 100644 index 0000000..5062007 --- /dev/null +++ b/cateditor/src/pages/editor/main.js @@ -0,0 +1,14 @@ +import Vue from 'vue' +import './../../plugins/vuetify' +import Vue2Filters from 'vue2-filters' +import App from './App.vue' +import { store } from './store' +import 'material-design-icons-iconfont/dist/material-design-icons.css' // Ensure you are using css-loader + +Vue.config.productionTip = false +Vue.use(Vue2Filters) + +new Vue({ + store, + render: h => h(App) +}).$mount('#app') diff --git a/cateditor/src/store/index.js b/cateditor/src/pages/editor/store/index.js similarity index 72% rename from cateditor/src/store/index.js rename to cateditor/src/pages/editor/store/index.js index d58cdb1..fe7e2f3 100644 --- a/cateditor/src/store/index.js +++ b/cateditor/src/pages/editor/store/index.js @@ -15,7 +15,9 @@ export const store = new Vuex.Store({ pages: [ [{ name: 'model name override', size: 2, ids: ['1001001', '1001002'] }, { size: 1, ids: ['1001011', '1001012'] }], // one page, two blocks - [{ size: 1, ids: ['1001021'] }], + [{ size: 1, + ids: ['1001021', '1001022', '1001023', '1001024', '1001025', + '1001026', '1001027', '1001028', '1001029'] }], ], }, { id: 2, @@ -52,6 +54,46 @@ export const store = new Vuex.Store({ family: 'BBBMF', name: 'Slither', color: 'Green / Blue' }, + '1001022': { id: '1001022', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Red / Blue' }, + '1001023': { id: '1001023', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Blue / Green' }, + '1001024': { id: '1001024', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Red / Green' }, + '1001025': { id: '1001025', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Orange / Blue' }, + '1001026': { id: '1001026', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Yellow / Blue' }, + '1001027': { id: '1001027', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Yellow / Blue' }, + '1001028': { id: '1001028', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Yellow / Blue' }, + '1001029': { id: '1001029', + model: 'BBB22', + family: 'BBBMF', + name: 'Slither', + color: 'Yellow / Blue' }, }, selectedSectionID: null, selectedFamilyID: null, diff --git a/cateditor/src/App.vue b/cateditor/src/pages/list/App.vue similarity index 65% rename from cateditor/src/App.vue rename to cateditor/src/pages/list/App.vue index a45e964..58494c0 100644 --- a/cateditor/src/App.vue +++ b/cateditor/src/pages/list/App.vue @@ -2,20 +2,20 @@ - +