resolver-egretimp-plus 0.1.47 → 0.1.48
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
|
@@ -6,6 +6,7 @@ import { findComponent } from '../../utils/common';
|
|
|
6
6
|
import { commonPropsType, PLAIN_TYPE_OPTIONS_COLUMNS } from '../../utils/const' // 这边不能用utils/index去引用,因为这个组件在utils/render.js中被引入了,会造成循环引用
|
|
7
7
|
import { computed, defineModel, defineProps, inject, getCurrentInstance } from 'vue'
|
|
8
8
|
import dayjs from 'dayjs'
|
|
9
|
+
import { isNaN } from '../../utils/is';
|
|
9
10
|
|
|
10
11
|
const modelValue = defineModel()
|
|
11
12
|
const props = defineProps({
|
|
@@ -99,8 +100,12 @@ const value = computed(() => {
|
|
|
99
100
|
// 转换inputNumber类型的值
|
|
100
101
|
function inputNumebrFormat(val, props) {
|
|
101
102
|
if (val === undefined || val === null) return ''
|
|
102
|
-
const precise = parseInt(props.config.precise)
|
|
103
|
-
|
|
103
|
+
const precise = parseInt(props.config.precise)
|
|
104
|
+
if (isNaN(precise)) {
|
|
105
|
+
return parseFloat(val)
|
|
106
|
+
} else {
|
|
107
|
+
return parseFloat(val)?.toFixed?.(precise)
|
|
108
|
+
}
|
|
104
109
|
}
|
|
105
110
|
|
|
106
111
|
const classObj = computed(() => ({
|