@lancom/shared 0.0.375 → 0.0.376
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.
|
@@ -8,49 +8,48 @@
|
|
|
8
8
|
{{ displayLabelText }}
|
|
9
9
|
</label>
|
|
10
10
|
<div style="display: flex">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
11
|
+
<!-- <div >
|
|
12
|
+
<multiselect
|
|
13
|
+
class="labelless"
|
|
14
|
+
v-model="code"
|
|
15
|
+
:options="codes"
|
|
16
|
+
style="margin-right: 5px; width: 130px;" />
|
|
17
|
+
</div> -->
|
|
18
|
+
<div style="flex-grow: 1;">
|
|
19
|
+
<validation-provider
|
|
20
|
+
v-slot="{ errors }"
|
|
21
|
+
tag="div"
|
|
22
|
+
class="form-row"
|
|
23
|
+
style="margin-bottom: 0;"
|
|
24
|
+
:name="namePrefix + 'Phone'"
|
|
25
|
+
:rules="required ? `required|phone:${code}` : `phone:${code}`">
|
|
26
|
+
<input
|
|
27
|
+
:id="'phone' + uniqueKey"
|
|
28
|
+
ref="phone"
|
|
29
|
+
v-model="model"
|
|
30
|
+
:placeholder="labelless ? placeholder : ''"
|
|
31
|
+
:disabled="disabled"
|
|
32
|
+
:name="'phone' + uniqueKey"
|
|
33
|
+
type="text"
|
|
34
|
+
class="form-field"
|
|
35
|
+
:class="{
|
|
36
|
+
'is-danger': errors.length,
|
|
37
|
+
filled: model,
|
|
38
|
+
labelless
|
|
39
|
+
}" />
|
|
40
|
+
<label
|
|
41
|
+
v-if="!labelless"
|
|
42
|
+
class="form-label label-inner"
|
|
43
|
+
:for="'phone' + uniqueKey">
|
|
44
|
+
{{ displayLabelText }}
|
|
45
|
+
</label>
|
|
46
|
+
<span
|
|
47
|
+
v-if="errors.length"
|
|
48
|
+
class="form-help is-danger">
|
|
49
|
+
{{ errors[0] }}
|
|
50
|
+
</span>
|
|
51
|
+
</validation-provider>
|
|
52
|
+
</div>
|
|
54
53
|
</div>
|
|
55
54
|
</div>
|
|
56
55
|
<span
|
|
@@ -121,13 +120,14 @@ export default {
|
|
|
121
120
|
},
|
|
122
121
|
model: {
|
|
123
122
|
get() {
|
|
124
|
-
return (this.value || '').replace(/^\+[0-9]{2}/, '');
|
|
123
|
+
return this.value; // (this.value || '').replace(/^\+[0-9]{2}/, '');
|
|
125
124
|
},
|
|
126
125
|
set(phone) {
|
|
127
|
-
if (this.code === '+61' && phone?.length === 10 && phone[0] === '0') {
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
this.$emit('input', `${this.code}${phone}`);
|
|
126
|
+
// if (this.code === '+61' && phone?.length === 10 && phone[0] === '0') {
|
|
127
|
+
// phone = phone.slice(1);
|
|
128
|
+
// }
|
|
129
|
+
// this.$emit('input', `${this.code}${phone}`);
|
|
130
|
+
this.$emit('input', phone);
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
}
|