Skip to content

Commit a0439c0

Browse files
authored
Merge pull request #1 from deanfchung/dean
list renders in dropdown menu
2 parents 91b9afc + 21b58d5 commit a0439c0

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/components/ComponentDisplay.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export default {
4747
...mapState(['routes', 'activeRoute', 'activeComponent', 'componentMap']),
4848
// used in VueDraggableResizeable component
4949
activeRouteArray () {
50+
// console.log('active route array method', this.routes[this.activeRoute])
5051
return this.routes[this.activeRoute]
5152
},
5253
// used to delete components

src/components/HomeSideDropDown.vue

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<q-card>
66
<q-card-section>
77
<div class="input-container">
8+
<!--
89
<q-input
910
standout="bg-teal text-white"
1011
bottom-slots
@@ -13,10 +14,23 @@
1314
:dense="dense"
1415
class="input-add"
1516
>
17+
1618
<template v-slot:append>
1719
<q-btn round dense flat icon="add" />
1820
</template>
1921
</q-input>
22+
-->
23+
<a v-for="componentData in activeRouteDisplay"
24+
:key="componentData.componentName"
25+
>
26+
<q-list bordered separator>
27+
<q-item clickable v-ripple>
28+
<q-item-section>{{componentData.componentName}}</q-item-section>
29+
30+
</q-item>
31+
32+
</q-list>
33+
</a>
2034
</div>
2135
</q-card-section>
2236
</q-card>
@@ -82,10 +96,21 @@
8296
</template>
8397
<script>
8498
import RouteDisplay from '../components/RouteDisplay'
99+
import { mapState } from 'vuex'
85100
86101
export default {
87102
components: {
88103
RouteDisplay
104+
},
105+
computed: {
106+
...mapState(['routes', 'activeRoute', 'activeComponent', 'componentMap']),
107+
// used in VueDraggableResizeable component
108+
activeRouteDisplay () {
109+
// console.log('active route array method', this.routes[this.activeRoute])
110+
let component = this.routes[this.activeRoute]
111+
console.log('component:', component)
112+
return component
113+
}
89114
}
90115
}
91116
</script>

0 commit comments

Comments
 (0)