@avakhula/ui 0.0.348 → 0.0.350
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
package/src/App.vue
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<ib-select :options="opt"
|
|
2
|
+
<ib-select :options="opt" :is-multiple="false"
|
|
3
|
+
:show-clear-button="false" :style="{ width: '400px' }">
|
|
3
4
|
<template v-slot:triggerContent="{ selectedCount }">
|
|
4
5
|
{{ selectedCount }}
|
|
5
6
|
</template>
|
|
6
7
|
</ib-select>
|
|
7
8
|
|
|
8
|
-
<ib-
|
|
9
|
+
<ib-phone-input></ib-phone-input>
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
</template>
|
|
@@ -16,121 +17,48 @@ import label from "@/components/Form/Label/Label.vue";
|
|
|
16
17
|
import {IbCheckboxGroup} from "./index.js";
|
|
17
18
|
import {IbRadio} from "./index.js";
|
|
18
19
|
import IbToggle from "@/components/Form/Toggle/Toggle.vue";
|
|
20
|
+
import {IbPhoneInput} from "./index.js";
|
|
19
21
|
const testData1 = [
|
|
20
22
|
{
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
visible: true,
|
|
26
|
-
isDisabled: true,
|
|
27
|
-
checked: false,
|
|
28
|
-
isChildrenVisible: false,
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "2",
|
|
32
|
-
title: "Education 2",
|
|
33
|
-
is_category: true,
|
|
34
|
-
initiallyVisible: true,
|
|
35
|
-
visible: true,
|
|
36
|
-
isDisabled: true,
|
|
37
|
-
checked: false,
|
|
38
|
-
isChildrenVisible: true,
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "3",
|
|
42
|
-
title: "Education 3",
|
|
43
|
-
is_category: true,
|
|
44
|
-
initiallyVisible: true,
|
|
45
|
-
visible: true,
|
|
46
|
-
isDisabled: false,
|
|
47
|
-
checked: false,
|
|
48
|
-
isChildrenVisible: true,
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
id: "4",
|
|
52
|
-
title: "Education 4",
|
|
53
|
-
is_category: true,
|
|
54
|
-
initiallyVisible: true,
|
|
55
|
-
visible: true,
|
|
56
|
-
isDisabled: false,
|
|
57
|
-
checked: false,
|
|
58
|
-
isChildrenVisible: true,
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
id: "5",
|
|
62
|
-
title: "Education 5",
|
|
63
|
-
is_category: true,
|
|
64
|
-
initiallyVisible: true,
|
|
65
|
-
visible: true,
|
|
66
|
-
isDisabled: true,
|
|
67
|
-
checked: false,
|
|
68
|
-
isChildrenVisible: true,
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
{
|
|
72
|
-
id: "6",
|
|
73
|
-
title: "Education 6",
|
|
74
|
-
is_category: true,
|
|
75
|
-
initiallyVisible: true,
|
|
76
|
-
visible: true,
|
|
23
|
+
disable: false,
|
|
24
|
+
active: false,
|
|
25
|
+
id: "2024-06-12 23:59:59.999999",
|
|
26
|
+
title: "One Day",
|
|
77
27
|
isDisabled: false,
|
|
78
|
-
|
|
79
|
-
isChildrenVisible: true,
|
|
28
|
+
showTooltipByDefault: true
|
|
80
29
|
},
|
|
81
|
-
|
|
82
30
|
{
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
isDisabled: false,
|
|
89
|
-
checked: false,
|
|
90
|
-
isChildrenVisible: true,
|
|
31
|
+
disable: false,
|
|
32
|
+
active: false,
|
|
33
|
+
id: "2024-06-18 23:59:59.999999",
|
|
34
|
+
title: "One Week",
|
|
35
|
+
isDisabled: false
|
|
91
36
|
},
|
|
92
|
-
|
|
93
37
|
{
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
isDisabled: false,
|
|
100
|
-
checked: false,
|
|
101
|
-
isChildrenVisible: true,
|
|
38
|
+
disable: false,
|
|
39
|
+
active: false,
|
|
40
|
+
id: "2024-06-25 23:59:59.999999",
|
|
41
|
+
title: "Two Weeks",
|
|
42
|
+
isDisabled: true
|
|
102
43
|
},
|
|
103
44
|
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
isChildrenVisible: true,
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "10",
|
|
115
|
-
title: "Education 10",
|
|
116
|
-
is_category: true,
|
|
117
|
-
initiallyVisible: true,
|
|
118
|
-
visible: true,
|
|
119
|
-
isDisabled: false,
|
|
120
|
-
checked: false,
|
|
121
|
-
isChildrenVisible: true,
|
|
45
|
+
disable: false,
|
|
46
|
+
active: false,
|
|
47
|
+
id: "2024-07-11 23:59:59.999999",
|
|
48
|
+
title: "One Month",
|
|
49
|
+
isDisabled: true,
|
|
50
|
+
disableTooltip: 'disable 123',
|
|
51
|
+
showTooltipByDefault: true
|
|
122
52
|
},
|
|
123
53
|
{
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
visible: true,
|
|
54
|
+
disable: false,
|
|
55
|
+
active: true,
|
|
56
|
+
id: "2025-02-01 23:59:59.999999",
|
|
57
|
+
title: "All Time",
|
|
129
58
|
isDisabled: true,
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
];
|
|
59
|
+
disableTooltip: 'disable 123'
|
|
60
|
+
}
|
|
61
|
+
]
|
|
134
62
|
export default {
|
|
135
63
|
computed: {
|
|
136
64
|
label() {
|
|
@@ -143,6 +71,6 @@ export default {
|
|
|
143
71
|
checked: '1'
|
|
144
72
|
}
|
|
145
73
|
},
|
|
146
|
-
components: {IbToggle, IbSelect, IbCheckboxGroup, IbRadio}
|
|
74
|
+
components: {IbToggle, IbSelect, IbCheckboxGroup, IbRadio, IbPhoneInput}
|
|
147
75
|
}
|
|
148
76
|
</script>
|
|
@@ -83,11 +83,15 @@ export default {
|
|
|
83
83
|
this.vueTel.choose(value);
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
86
|
+
this.phone = "+" + data.dialCode;
|
|
87
|
+
|
|
88
|
+
// if (!this.phone || this.phone.length - 1 < this.dialCode.length) {
|
|
89
|
+
// console.log('1')
|
|
90
|
+
// this.phone = "+" + data.dialCode;
|
|
91
|
+
// } else if (this.dialCode) {
|
|
92
|
+
// console.log(2)
|
|
93
|
+
// this.phone = this.phone.replace(this.dialCode, data.dialCode);
|
|
94
|
+
// }
|
|
91
95
|
this.dialCode = data.dialCode;
|
|
92
96
|
},
|
|
93
97
|
clickOutside() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<li>
|
|
3
3
|
<div
|
|
4
|
-
v-tooltip="showTooltip ? option.title : ''"
|
|
4
|
+
v-tooltip="showTooltip ? (option.isDisabled ? option.disableTooltip : option.title) : ''"
|
|
5
5
|
class="tree-select-option"
|
|
6
6
|
tabindex="0"
|
|
7
7
|
role="option"
|
|
@@ -174,10 +174,16 @@ export default {
|
|
|
174
174
|
if (this.option.hasOwnProperty("children") && this.option.children) {
|
|
175
175
|
this.checkParent();
|
|
176
176
|
}
|
|
177
|
+
|
|
178
|
+
if(this.option.showTooltipByDefault) {
|
|
179
|
+
this.showTooltip = true;
|
|
180
|
+
}
|
|
177
181
|
},
|
|
178
182
|
updated() {
|
|
179
183
|
this.$nextTick(() => {
|
|
180
|
-
if
|
|
184
|
+
if(this.option.showTooltipByDefault) {
|
|
185
|
+
this.showTooltip = true;
|
|
186
|
+
} else if (multiLineOverflows(this.$el.querySelector(".option-label"))) {
|
|
181
187
|
this.showTooltip = true;
|
|
182
188
|
}
|
|
183
189
|
});
|
|
@@ -6,12 +6,14 @@ const tooltip = new Tooltip();
|
|
|
6
6
|
const createTooltip = (el, binding) => {
|
|
7
7
|
if (multiLineOverflows(el)) {
|
|
8
8
|
|
|
9
|
+
const position = Object.keys(binding.modifiers)[0] || binding.arg;
|
|
10
|
+
|
|
9
11
|
const content = {
|
|
10
12
|
title: binding.value.title || '',
|
|
11
13
|
text: typeof(binding.value) === 'object' ? binding.value.text : binding.value,
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
tooltip.createTooltip(el, content);
|
|
16
|
+
tooltip.createTooltip(el, content, position);
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
|