@community-release/nx-ui 0.0.57 → 0.0.58
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/module.json
CHANGED
|
@@ -17,11 +17,10 @@
|
|
|
17
17
|
|
|
18
18
|
@change="updateValue($event.target.value)"
|
|
19
19
|
@input="updateValue($event.target.value)"
|
|
20
|
-
@
|
|
20
|
+
@focus="handleFocusBlur(true, $event.target.value)"
|
|
21
|
+
@blur="handleFocusBlur(false, $event.target.value)"
|
|
21
22
|
@keyup.enter="updateValue($event.target.value, true, true)"
|
|
22
23
|
|
|
23
|
-
@focus="haveFocus = true"
|
|
24
|
-
|
|
25
24
|
formnovalidate
|
|
26
25
|
spellcheck="false"
|
|
27
26
|
/>
|
|
@@ -38,7 +37,7 @@
|
|
|
38
37
|
import comProps from '#build/ui.input.mjs';
|
|
39
38
|
|
|
40
39
|
// Misc
|
|
41
|
-
const emit = defineEmits(['input', 'enter', 'blur', 'update:modelValue']);
|
|
40
|
+
const emit = defineEmits(['input', 'enter', 'focus', 'blur', 'update:modelValue']);
|
|
42
41
|
const slots = useSlots();
|
|
43
42
|
|
|
44
43
|
// Data
|
|
@@ -109,11 +108,11 @@
|
|
|
109
108
|
if (submit) emit('enter', validValue);
|
|
110
109
|
}
|
|
111
110
|
|
|
112
|
-
function
|
|
113
|
-
haveFocus.value =
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
updateValue(
|
|
111
|
+
function handleFocusBlur(focus, value) {
|
|
112
|
+
haveFocus.value = focus;
|
|
113
|
+
emit(focus ? 'focus' : 'blur', focus);
|
|
114
|
+
|
|
115
|
+
if (!focus) updateValue(value);
|
|
117
116
|
}
|
|
118
117
|
|
|
119
118
|
const hasSlot = (name) => {
|