]> git.jsancho.org Git - vanzui.git/blob - src/components/VSelector.vue
Add components to canvas
[vanzui.git] / src / components / VSelector.vue
1 <template>
2   <b-button-group>
3     <b-button
4       v-for="(item, index) in items"
5       :key="index"
6       @click="selectItem(item.tag)"
7     >
8       {{ item.caption }}
9     </b-button>
10   </b-button-group>
11 </template>
12
13 <script>
14 export default {
15   name: "VSelector",
16   data() {
17     return {
18       items: [
19         {
20           tag: "b-form-input",
21           caption: "Form Input",
22         },
23         {
24           tag: "b-form-radio",
25           caption: "Form Radio",
26         },
27         {
28           tag: "b-form-select",
29           caption: "Form Select",
30         },
31       ],
32     };
33   },
34   methods: {
35     selectItem(tag) {
36       this.$emit("select", tag);
37     },
38   },
39 };
40 </script>