@avakhula/ui 0.0.91 → 0.0.92
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/package.json
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
<component
|
|
3
3
|
:is="href.length ? 'a' : 'button'"
|
|
4
4
|
@click="onClick($event)"
|
|
5
|
+
@mouseenter="onMouseenter"
|
|
6
|
+
@mouseleave="onMouseleave"
|
|
5
7
|
v-bind="attrs"
|
|
6
8
|
>
|
|
7
9
|
<slot name="icon"></slot>
|
|
@@ -83,6 +85,12 @@ export default {
|
|
|
83
85
|
},
|
|
84
86
|
},
|
|
85
87
|
methods: {
|
|
88
|
+
onMouseenter(e) {
|
|
89
|
+
this.$emit("mouseenter", e);
|
|
90
|
+
},
|
|
91
|
+
onMouseleave(e) {
|
|
92
|
+
this.$emit("mouseleave", e);
|
|
93
|
+
},
|
|
86
94
|
onClick(e) {
|
|
87
95
|
if (this.preventDefault || this.isDisabled) {
|
|
88
96
|
e.preventDefault();
|
|
@@ -134,7 +142,7 @@ export default {
|
|
|
134
142
|
return classList;
|
|
135
143
|
},
|
|
136
144
|
attrs() {
|
|
137
|
-
const attrsList = { ...removeEvents({ ...this.$attrs }
|
|
145
|
+
const attrsList = { ...removeEvents({ ...this.$attrs }) };
|
|
138
146
|
|
|
139
147
|
attrsList.class = [...this.classes, attrsList.class];
|
|
140
148
|
attrsList.disabled = this.isDisabled;
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
86
86
|
return classList;
|
|
87
87
|
},
|
|
88
88
|
attrs() {
|
|
89
|
-
const attrsList = { ...removeEvents({ ...this.$attrs }
|
|
89
|
+
const attrsList = { ...removeEvents({ ...this.$attrs }) };
|
|
90
90
|
attrsList.class = [...this.classes, attrsList.class];
|
|
91
91
|
|
|
92
92
|
return attrsList;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
export default function removeEvents(attrList
|
|
1
|
+
export default function removeEvents(attrList) {
|
|
2
2
|
for (let prop in attrList) {
|
|
3
|
-
if (
|
|
3
|
+
if (prop.startsWith("on")) {
|
|
4
4
|
delete attrList[prop];
|
|
5
|
-
} else {
|
|
6
|
-
if (prop.startsWith("on")) {
|
|
7
|
-
delete attrList[prop];
|
|
8
|
-
}
|
|
9
5
|
}
|
|
10
6
|
}
|
|
11
7
|
|