@fy-/fws-vue 2.1.34 → 2.1.36
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.
|
@@ -132,6 +132,7 @@ defineExpose({ focus, blur, getInputRef })
|
|
|
132
132
|
'textarea-grow',
|
|
133
133
|
'select',
|
|
134
134
|
'phone',
|
|
135
|
+
'tel',
|
|
135
136
|
'range',
|
|
136
137
|
'chips',
|
|
137
138
|
'tags',
|
|
@@ -146,6 +147,7 @@ defineExpose({ focus, blur, getInputRef })
|
|
|
146
147
|
[
|
|
147
148
|
'text',
|
|
148
149
|
'phone',
|
|
150
|
+
'tel',
|
|
149
151
|
'password',
|
|
150
152
|
'range',
|
|
151
153
|
'email',
|
|
@@ -170,7 +172,7 @@ defineExpose({ focus, blur, getInputRef })
|
|
|
170
172
|
:id="id"
|
|
171
173
|
ref="inputRef"
|
|
172
174
|
v-model="model"
|
|
173
|
-
:type="type === 'datepicker' ? 'date' : type"
|
|
175
|
+
:type="type === 'datepicker' ? 'date' : type === 'phone' ? 'tel' : type"
|
|
174
176
|
:name="id"
|
|
175
177
|
:class="{
|
|
176
178
|
'error': checkErrors,
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
TransitionRoot,
|
|
6
6
|
} from '@headlessui/vue'
|
|
7
7
|
import { XCircleIcon } from '@heroicons/vue/24/solid'
|
|
8
|
-
import { h, onMounted, onUnmounted, ref } from 'vue'
|
|
8
|
+
import { h, onMounted, onUnmounted, ref, watch } from 'vue'
|
|
9
9
|
import { useEventBus } from '../../composables/event-bus'
|
|
10
10
|
|
|
11
11
|
const props = withDefaults(
|
|
@@ -32,11 +32,14 @@ function setModal(value: boolean) {
|
|
|
32
32
|
if (value === true) {
|
|
33
33
|
if (props.onOpen) props.onOpen()
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
if (props.onClose) props.onClose()
|
|
37
|
-
}
|
|
35
|
+
|
|
38
36
|
isOpen.value = value
|
|
39
37
|
}
|
|
38
|
+
watch(isOpen, (value) => {
|
|
39
|
+
if (value === false) {
|
|
40
|
+
if (props.onClose) props.onClose()
|
|
41
|
+
}
|
|
42
|
+
})
|
|
40
43
|
onMounted(() => {
|
|
41
44
|
eventBus.on(`${props.id}Modal`, setModal)
|
|
42
45
|
})
|