resolver-egretimp-plus 0.1.40 → 0.1.41
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/package.json
CHANGED
|
@@ -74,6 +74,8 @@ const value = computed(() => {
|
|
|
74
74
|
isPatchComponent(PLAIN_TYPE_OPTIONS_COLUMNS, props)
|
|
75
75
|
) {
|
|
76
76
|
return selectFormat(modelValue.value)
|
|
77
|
+
} else if (isPatchComponent(['ElInputNumber'], props)) {
|
|
78
|
+
return inputNumebrFormat(modelValue.value, props)
|
|
77
79
|
} else {
|
|
78
80
|
if (isPatchComponent(['ElDatePicker'], props)) {
|
|
79
81
|
if (!modelValue.value) {
|
|
@@ -89,6 +91,13 @@ const value = computed(() => {
|
|
|
89
91
|
}
|
|
90
92
|
})
|
|
91
93
|
|
|
94
|
+
// 转换inputNumber类型的值
|
|
95
|
+
function inputNumebrFormat(val, props) {
|
|
96
|
+
if (val === undefined || val === null) return ''
|
|
97
|
+
const precise = parseInt(props.config.precise) || 0
|
|
98
|
+
return parseFloat(val)?.toFixed?.(precise)
|
|
99
|
+
}
|
|
100
|
+
|
|
92
101
|
const classObj = computed(() => ({
|
|
93
102
|
[`custom-component-plain--${props.type}`]: true,
|
|
94
103
|
cursor: props.isPointer == '1'
|
|
@@ -37,7 +37,7 @@ const inputNumberProps = computed(() => {
|
|
|
37
37
|
if (props.config?.minValue && !isNaN(props.config.minValue)) {
|
|
38
38
|
ret.min = parseFloat(props.config.minValue)
|
|
39
39
|
}
|
|
40
|
-
if (props.config?.precise && !isNaN(props.config.
|
|
40
|
+
if (props.config?.precise && !isNaN(props.config.precise)) {
|
|
41
41
|
ret.precision = parseInt(props.config.precise)
|
|
42
42
|
}
|
|
43
43
|
if (ret.step) {
|