sprintify-ui 0.0.55 → 0.0.57
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/sprintify-ui.es.js +2520 -2532
- package/package.json +1 -1
- package/src/components/BaseSelect.vue +0 -33
package/package.json
CHANGED
|
@@ -64,7 +64,6 @@ const props = defineProps({
|
|
|
64
64
|
},
|
|
65
65
|
});
|
|
66
66
|
|
|
67
|
-
const mounted = useMounted();
|
|
68
67
|
const select = ref(null) as Ref<HTMLSelectElement | null>;
|
|
69
68
|
|
|
70
69
|
const emit = defineEmits(['update:modelValue']);
|
|
@@ -121,38 +120,6 @@ function validModelValue(): boolean {
|
|
|
121
120
|
return options.findIndex((o) => isEqual(o.value, props.modelValue)) != -1;
|
|
122
121
|
}
|
|
123
122
|
|
|
124
|
-
/**
|
|
125
|
-
* This watcher is used to update the parent value
|
|
126
|
-
* if the given modelValue should be empty.
|
|
127
|
-
*/
|
|
128
|
-
watch(
|
|
129
|
-
() => props.modelValue,
|
|
130
|
-
() => validateAndFixModelVale()
|
|
131
|
-
);
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Re-trigger the same validation on mounted
|
|
135
|
-
*/
|
|
136
|
-
onMounted(() => {
|
|
137
|
-
validateAndFixModelVale();
|
|
138
|
-
});
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Validate the current Model Value. Transform to external empty if :
|
|
142
|
-
* 1. is internal empty
|
|
143
|
-
* 2. is in the current options
|
|
144
|
-
*/
|
|
145
|
-
function validateAndFixModelVale() {
|
|
146
|
-
if (!mounted.value) {
|
|
147
|
-
return;
|
|
148
|
-
}
|
|
149
|
-
if (isEmptyInternal(props.modelValue)) {
|
|
150
|
-
emitUpdate(EMPTY_VALUE_EXTERNAL);
|
|
151
|
-
} else if (!validModelValue()) {
|
|
152
|
-
emitUpdate(EMPTY_VALUE_EXTERNAL);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
123
|
/**
|
|
157
124
|
*
|
|
158
125
|
* Emit change while mutating internal empty value ''
|