Mercurial > gemma
comparison client/src/components/Layerselect.vue @ 531:9c036b32c852
refac: Layer selection componentized
POC from 22cca659e40b splitted into a layerselection component and
iterative rendering. Now more vuelike.
author | Thomas Junk <thomas.junk@intevation.de> |
---|---|
date | Tue, 28 Aug 2018 12:53:56 +0200 |
parents | |
children | 505656a9947f |
comparison
equal
deleted
inserted
replaced
530:a6d732584c4e | 531:9c036b32c852 |
---|---|
1 <template> | |
2 <div class="d-flex"> | |
3 <label :for="layername">{{this.layername}}</label> | |
4 <input @change="visibilityToggled" | |
5 :id="layername" | |
6 type="checkbox" | |
7 :checked="isVisible"> | |
8 </div> | |
9 </template> | |
10 | |
11 <style lang="sass"> | |
12 | |
13 </style> | |
14 | |
15 | |
16 <script> | |
17 export default { | |
18 props: ["layername", "layerindex", "isVisible"], | |
19 name: "layerselect", | |
20 methods: { | |
21 visibilityToggled() { | |
22 this.$emit("visibilityToggled", this.layerindex); | |
23 } | |
24 } | |
25 }; | |
26 </script> |