@fishawack/lab-velocity 0.9.1 → 0.9.2
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/form/Select.vue +7 -5
- package/package.json +1 -1
package/form/Select.vue
CHANGED
|
@@ -17,11 +17,12 @@
|
|
|
17
17
|
@change="handleInput"
|
|
18
18
|
@clear="this.$emit('clear')"
|
|
19
19
|
@blur="this.$emit('blur')"
|
|
20
|
+
:empty-values="[null, undefined]"
|
|
20
21
|
>
|
|
21
22
|
<template #default>
|
|
22
23
|
<slot name="default">
|
|
23
24
|
<el-option
|
|
24
|
-
v-if="!options[0]?.
|
|
25
|
+
v-if="!options[0]?.label"
|
|
25
26
|
v-for="(label, value) in options"
|
|
26
27
|
:key="value"
|
|
27
28
|
:label="label"
|
|
@@ -93,12 +94,13 @@ export default {
|
|
|
93
94
|
emits: ['change', 'clear', 'blur'],
|
|
94
95
|
methods: {
|
|
95
96
|
castValue(value) {
|
|
96
|
-
|
|
97
|
+
if (
|
|
97
98
|
!_.isNull(value) &&
|
|
98
99
|
typeof value === "string" &&
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
value !== "" &&
|
|
101
|
+
!isNaN(Number(value))
|
|
102
|
+
) {
|
|
103
|
+
return parseInt(value);
|
|
102
104
|
}
|
|
103
105
|
return value;
|
|
104
106
|
}
|