@avakhula/ui 0.0.17 → 0.0.18
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 +336 -332
- package/dist/index.umd.cjs +13 -13
- package/package.json +1 -1
- package/src/App.vue +10 -0
- package/src/components/Form/Checkbox/Checkbox.vue +11 -1
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -8,10 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
<button @click="changeValue">Change value</button>
|
|
10
10
|
<button @click="changeValueInProps">Change value in props</button>
|
|
11
|
+
|
|
12
|
+
<ib-checkbox @input="test1" class="hello"/>
|
|
11
13
|
</template>
|
|
12
14
|
|
|
13
15
|
<script>
|
|
14
16
|
import IbSelect from "./components/TreeSelect/Select.vue";
|
|
17
|
+
import IbCheckbox from "./components/Form/Checkbox/Checkbox.vue"
|
|
18
|
+
|
|
19
|
+
|
|
15
20
|
const testData = [
|
|
16
21
|
{
|
|
17
22
|
id: "1",
|
|
@@ -69,8 +74,13 @@ export default {
|
|
|
69
74
|
},
|
|
70
75
|
components: {
|
|
71
76
|
IbSelect,
|
|
77
|
+
IbCheckbox
|
|
72
78
|
},
|
|
73
79
|
methods: {
|
|
80
|
+
test1() {
|
|
81
|
+
console.log('test 1')
|
|
82
|
+
},
|
|
83
|
+
|
|
74
84
|
changeValue() {
|
|
75
85
|
console.log('test')
|
|
76
86
|
this.test = testData[2].id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
|
-
|
|
3
|
+
v-bind="attrs"
|
|
4
4
|
:for="id"
|
|
5
5
|
:tabindex="disabled ? -1 : 0"
|
|
6
6
|
@keypress.prevent="onChange"
|
|
@@ -47,6 +47,7 @@
|
|
|
47
47
|
</template>
|
|
48
48
|
<script>
|
|
49
49
|
import generateUID from "../../../helpers/generateUID";
|
|
50
|
+
import removeEvents from "../../../helpers/removeEvents";
|
|
50
51
|
import IbIcon from "../../Icon.vue";
|
|
51
52
|
|
|
52
53
|
export default {
|
|
@@ -100,6 +101,7 @@ export default {
|
|
|
100
101
|
methods: {
|
|
101
102
|
onChange() {
|
|
102
103
|
this.checked = !this.checked;
|
|
104
|
+
console.log('input')
|
|
103
105
|
this.$emit("input", this.checked);
|
|
104
106
|
},
|
|
105
107
|
},
|
|
@@ -116,10 +118,18 @@ export default {
|
|
|
116
118
|
indeterminate() {
|
|
117
119
|
return this.isChecked === null;
|
|
118
120
|
},
|
|
121
|
+
attrs() {
|
|
122
|
+
const attrsList = { ...removeEvents({ ...this.$attrs }) };
|
|
123
|
+
|
|
124
|
+
attrsList.class = [this.classes, attrsList.class];
|
|
125
|
+
|
|
126
|
+
return attrsList;
|
|
127
|
+
},
|
|
119
128
|
},
|
|
120
129
|
components: {
|
|
121
130
|
IbIcon,
|
|
122
131
|
},
|
|
132
|
+
inheritAttrs: false,
|
|
123
133
|
};
|
|
124
134
|
</script>
|
|
125
135
|
|