@avakhula/ui 0.0.89 → 0.0.91
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/index.js +7 -7
- package/dist/index.umd.cjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/App.vue +8 -124
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Form/Input/Input.vue +1 -1
- package/src/components/IconButton/IconButton.vue +1 -1
- package/src/helpers/removeEvents.js +6 -2
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -1,136 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ib-
|
|
2
|
+
<ib-button @mouseenter="test" @mouseleave="test1"> test </ib-button>
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script>
|
|
6
|
-
import
|
|
6
|
+
import IbButton from "./components/Button/Button.vue";
|
|
7
7
|
export default {
|
|
8
|
-
data() {
|
|
9
|
-
return {
|
|
10
|
-
testData1: [
|
|
11
|
-
{
|
|
12
|
-
id: "1",
|
|
13
|
-
title: "A Education",
|
|
14
|
-
is_category: true,
|
|
15
|
-
initiallyVisible: true,
|
|
16
|
-
visible: true,
|
|
17
|
-
isDisabled: false,
|
|
18
|
-
checked: true,
|
|
19
|
-
isChildrenVisible: true,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "2",
|
|
23
|
-
title: "Education 2",
|
|
24
|
-
is_category: true,
|
|
25
|
-
initiallyVisible: true,
|
|
26
|
-
visible: true,
|
|
27
|
-
isDisabled: false,
|
|
28
|
-
checked: true,
|
|
29
|
-
isChildrenVisible: true,
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
id: "3",
|
|
33
|
-
title: "Education 3",
|
|
34
|
-
is_category: true,
|
|
35
|
-
initiallyVisible: true,
|
|
36
|
-
visible: true,
|
|
37
|
-
isDisabled: false,
|
|
38
|
-
checked: false,
|
|
39
|
-
isChildrenVisible: true,
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
id: "4",
|
|
43
|
-
title: "Education 4",
|
|
44
|
-
is_category: true,
|
|
45
|
-
initiallyVisible: true,
|
|
46
|
-
visible: true,
|
|
47
|
-
isDisabled: false,
|
|
48
|
-
checked: false,
|
|
49
|
-
isChildrenVisible: true,
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "5",
|
|
53
|
-
title: "Education 5",
|
|
54
|
-
is_category: true,
|
|
55
|
-
initiallyVisible: true,
|
|
56
|
-
visible: true,
|
|
57
|
-
isDisabled: false,
|
|
58
|
-
checked: false,
|
|
59
|
-
isChildrenVisible: true,
|
|
60
|
-
},
|
|
61
|
-
|
|
62
|
-
{
|
|
63
|
-
id: "6",
|
|
64
|
-
title: "Education 6",
|
|
65
|
-
is_category: true,
|
|
66
|
-
initiallyVisible: true,
|
|
67
|
-
visible: true,
|
|
68
|
-
isDisabled: false,
|
|
69
|
-
checked: false,
|
|
70
|
-
isChildrenVisible: true,
|
|
71
|
-
},
|
|
72
|
-
|
|
73
|
-
{
|
|
74
|
-
id: "7",
|
|
75
|
-
title: "Education 7",
|
|
76
|
-
is_category: true,
|
|
77
|
-
initiallyVisible: true,
|
|
78
|
-
visible: true,
|
|
79
|
-
isDisabled: false,
|
|
80
|
-
checked: false,
|
|
81
|
-
isChildrenVisible: true,
|
|
82
|
-
},
|
|
83
|
-
|
|
84
|
-
{
|
|
85
|
-
id: "8",
|
|
86
|
-
title: "Education 8",
|
|
87
|
-
is_category: true,
|
|
88
|
-
initiallyVisible: true,
|
|
89
|
-
visible: true,
|
|
90
|
-
isDisabled: false,
|
|
91
|
-
checked: false,
|
|
92
|
-
isChildrenVisible: true,
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
id: "9",
|
|
96
|
-
title: "Education 9",
|
|
97
|
-
is_category: true,
|
|
98
|
-
initiallyVisible: true,
|
|
99
|
-
visible: true,
|
|
100
|
-
isDisabled: false,
|
|
101
|
-
checked: false,
|
|
102
|
-
isChildrenVisible: true,
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
id: "10",
|
|
106
|
-
title: "Education 10",
|
|
107
|
-
is_category: true,
|
|
108
|
-
initiallyVisible: true,
|
|
109
|
-
visible: true,
|
|
110
|
-
isDisabled: false,
|
|
111
|
-
checked: false,
|
|
112
|
-
isChildrenVisible: true,
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
id: "11",
|
|
116
|
-
title: "Education 11",
|
|
117
|
-
is_category: true,
|
|
118
|
-
initiallyVisible: true,
|
|
119
|
-
visible: true,
|
|
120
|
-
isDisabled: false,
|
|
121
|
-
checked: false,
|
|
122
|
-
isChildrenVisible: true,
|
|
123
|
-
},
|
|
124
|
-
],
|
|
125
|
-
};
|
|
126
|
-
},
|
|
127
8
|
methods: {
|
|
128
|
-
test(
|
|
129
|
-
console.log(
|
|
9
|
+
test() {
|
|
10
|
+
console.log('test')
|
|
11
|
+
},
|
|
12
|
+
test1() {
|
|
13
|
+
console.log('test')
|
|
130
14
|
}
|
|
131
15
|
},
|
|
132
16
|
components: {
|
|
133
|
-
|
|
17
|
+
IbButton,
|
|
134
18
|
},
|
|
135
19
|
};
|
|
136
20
|
</script>
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
return classList;
|
|
135
135
|
},
|
|
136
136
|
attrs() {
|
|
137
|
-
const attrsList = { ...removeEvents({ ...this.$attrs }) };
|
|
137
|
+
const attrsList = { ...removeEvents({ ...this.$attrs }, "onClick") };
|
|
138
138
|
|
|
139
139
|
attrsList.class = [...this.classes, attrsList.class];
|
|
140
140
|
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 }, "onClick") };
|
|
90
90
|
attrsList.class = [...this.classes, attrsList.class];
|
|
91
91
|
|
|
92
92
|
return attrsList;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
export default function removeEvents(attrList) {
|
|
1
|
+
export default function removeEvents(attrList, eventName) {
|
|
2
2
|
for (let prop in attrList) {
|
|
3
|
-
if (prop
|
|
3
|
+
if (eventName && prop === eventName) {
|
|
4
4
|
delete attrList[prop];
|
|
5
|
+
} else {
|
|
6
|
+
if (prop.startsWith("on")) {
|
|
7
|
+
delete attrList[prop];
|
|
8
|
+
}
|
|
5
9
|
}
|
|
6
10
|
}
|
|
7
11
|
|