|
5 | 5 | <q-card> |
6 | 6 | <q-card-section> |
7 | 7 | <div class="input-container"> |
8 | | - <!-- |
9 | | - <q-input |
10 | | - standout="bg-teal text-white" |
11 | | - bottom-slots |
12 | | - v-model="text" |
13 | | - label="Add Component" |
14 | | - :dense="dense" |
15 | | - class="input-add" |
16 | | - > |
17 | | -
|
18 | | - <template v-slot:append> |
19 | | - <q-btn round dense flat icon="add" /> |
20 | | - </template> |
21 | | - </q-input> |
22 | | - --> |
23 | | - <a v-for="componentData in activeRouteDisplay" |
24 | | - :key="componentData.componentName" |
25 | | - v-on:click="onActivated(componentData)" |
26 | | - > |
27 | | - <q-list bordered separator> |
28 | | - <q-item clickable v-ripple> |
29 | | - <q-item-section>{{componentData.componentName}}</q-item-section> |
30 | | - |
31 | | - </q-item> |
32 | | - |
33 | | - </q-list> |
34 | | - </a> |
| 8 | + <ComponentList /> |
35 | 9 | </div> |
36 | 10 | </q-card-section> |
37 | 11 | </q-card> |
38 | 12 | </q-expansion-item> |
39 | | - |
40 | 13 | <q-expansion-item dense dense-toggle expand-separator label="Routes"> |
41 | 14 | <q-card> |
42 | 15 | <q-card-section> |
43 | 16 | <div class="input-container"> |
44 | 17 | <RouteDisplay /> |
45 | | - <br> |
| 18 | + <br /> |
46 | 19 | </div> |
47 | 20 | </q-card-section> |
48 | 21 | </q-card> |
|
52 | 25 | <q-card> |
53 | 26 | <q-card-section> |
54 | 27 | <div class="input-container"> |
55 | | - <q-input |
56 | | - standout="bg-teal text-white" |
57 | | - bottom-slots |
58 | | - v-model="text" |
59 | | - label="Add Vuex" |
60 | | - :dense="dense" |
61 | | - class="input-add" |
62 | | - > |
63 | | - <template v-slot:append> |
64 | | - <q-btn round dense flat icon="add" /> |
65 | | - </template> |
66 | | - </q-input> |
67 | | - <q-input |
68 | | - standout="bg-teal text-white" |
69 | | - bottom-slots |
70 | | - v-model="text" |
71 | | - label="Add Action" |
72 | | - :dense="dense" |
73 | | - class="input-add" |
74 | | - > |
75 | | - <template v-slot:append> |
76 | | - <q-btn round dense flat icon="add" /> |
77 | | - </template> |
78 | | - </q-input> |
79 | | - <q-input |
80 | | - standout="bg-teal text-white" |
81 | | - bottom-slots |
82 | | - v-model="text" |
83 | | - label="Add Mutation" |
84 | | - :dense="dense" |
85 | | - class="input-add" |
86 | | - > |
87 | | - <template v-slot:append> |
88 | | - <q-btn round dense flat icon="add" /> |
89 | | - </template> |
90 | | - </q-input> |
| 28 | + <VuexForm /> |
91 | 29 | </div> |
92 | 30 | </q-card-section> |
93 | 31 | </q-card> |
|
97 | 35 | </template> |
98 | 36 | <script> |
99 | 37 | import RouteDisplay from '../components/RouteDisplay' |
100 | | -import { mapState, mapActions } from 'vuex' |
| 38 | +import ComponentList from './HomeSideDropDownItems/ComponentList' |
| 39 | +import VuexForm from './HomeSideDropDownItems/VuexForm' |
101 | 40 |
|
102 | 41 | export default { |
103 | 42 | components: { |
104 | | - RouteDisplay |
105 | | - }, |
106 | | - computed: { |
107 | | - ...mapState(['routes', 'activeRoute', 'activeComponent', 'componentMap']), |
108 | | - // used in VueDraggableResizeable component |
109 | | - activeRouteDisplay () { |
110 | | - // console.log('active route array method', this.routes[this.activeRoute]) |
111 | | - let component = this.routes[this.activeRoute] |
112 | | - // console.log('component:', component) |
113 | | - return component |
114 | | - }, |
115 | | - activeComponentData () { |
116 | | - // find out what this does |
117 | | - return this.activeRouteDisplay.filter(componentData => { |
118 | | - return componentData.componentName === this.activeComponent |
119 | | - })[0] |
120 | | - } |
121 | | - }, |
122 | | - methods: { |
123 | | - ...mapActions(['setActiveComponent']), |
124 | | - onActivated (componentData) { |
125 | | - this.setActiveComponent(componentData.componentName) |
126 | | - this.activeComponentData.isActive = true |
127 | | - console.log('this.activeComponent', this.activeComponent) |
128 | | - } |
| 43 | + RouteDisplay, |
| 44 | + VuexForm, |
| 45 | + ComponentList |
129 | 46 | } |
130 | 47 | } |
131 | 48 | </script> |
132 | 49 |
|
133 | 50 | <style lang="stylus" scoped> |
134 | 51 | .input-add { |
135 | | - margin: 0em 1em 0em 1em; |
136 | | - } |
| 52 | + margin: 0em 1em 0em 1em; |
| 53 | +} |
137 | 54 | .input-container { |
138 | | - margin-top: 1rem; |
139 | | - } |
140 | | -
|
| 55 | + margin-top: 1rem; |
| 56 | +} |
141 | 57 | </style> |
0 commit comments