@mozaic-ds/vue 0.21.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/mozaic-vue.adeo.umd.js +15 -7
- package/dist/mozaic-vue.common.js +15 -7
- package/dist/mozaic-vue.common.js.map +1 -1
- package/dist/mozaic-vue.umd.js +13 -5
- package/dist/mozaic-vue.umd.js.map +1 -1
- package/dist/mozaic-vue.umd.min.js +1 -1
- package/dist/mozaic-vue.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/listbox/MListBoxActions.vue +13 -6
package/package.json
CHANGED
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
aria-labelledby="listbox"
|
|
17
17
|
>
|
|
18
18
|
<ul
|
|
19
|
-
v-for="(list,
|
|
20
|
-
:key="
|
|
19
|
+
v-for="(list, i) in listItems"
|
|
20
|
+
:key="`list${i}`"
|
|
21
21
|
class="mc-listbox-options__list"
|
|
22
22
|
>
|
|
23
23
|
<li
|
|
24
|
-
v-for="item in list"
|
|
25
|
-
:key="item
|
|
24
|
+
v-for="(item, j) in list"
|
|
25
|
+
:key="`item${j}`"
|
|
26
26
|
class="mc-listbox-options__tile"
|
|
27
27
|
:class="{ 'is-disabled': item.disabled }"
|
|
28
28
|
>
|
|
@@ -36,10 +36,10 @@
|
|
|
36
36
|
:is="item.href ? 'a' : 'button'"
|
|
37
37
|
:href="item.href ? item.href : null"
|
|
38
38
|
:type="item.href ? null : 'button'"
|
|
39
|
-
:disabled="item.
|
|
39
|
+
:disabled="item.disabled ? true : null"
|
|
40
40
|
class="mc-listbox-options__item"
|
|
41
41
|
:class="{ 'is-danger': item.danger, 'is-disabled': item.disabled }"
|
|
42
|
-
@click.self="
|
|
42
|
+
@click.self="onClickItem(item, i, j)"
|
|
43
43
|
>
|
|
44
44
|
{{ item.text }}
|
|
45
45
|
</component>
|
|
@@ -118,6 +118,13 @@ export default {
|
|
|
118
118
|
onClickOutside() {
|
|
119
119
|
this.isOpen = false;
|
|
120
120
|
},
|
|
121
|
+
onClickItem(item, listIndex, itemIndex) {
|
|
122
|
+
const valToEmit = Object.assign(
|
|
123
|
+
{ listIndex: listIndex, itemIndex: itemIndex },
|
|
124
|
+
item
|
|
125
|
+
);
|
|
126
|
+
this.$emit('update:itemSelected', valToEmit);
|
|
127
|
+
},
|
|
121
128
|
},
|
|
122
129
|
};
|
|
123
130
|
</script>
|