resolver-egretimp-plus 0.1.61 → 0.1.62
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
|
@@ -89,7 +89,16 @@ const value = computed(() => {
|
|
|
89
89
|
if (!modelValue.value) {
|
|
90
90
|
return ''
|
|
91
91
|
}
|
|
92
|
-
|
|
92
|
+
let val = ''
|
|
93
|
+
if (isNaN(Number(modelValue.value))) {
|
|
94
|
+
val = modelValue.value
|
|
95
|
+
} else {
|
|
96
|
+
if (props.config?.valueFormat === 'timestamp') {
|
|
97
|
+
val = Number(modelValue.value)
|
|
98
|
+
} else {
|
|
99
|
+
val = modelValue.value
|
|
100
|
+
}
|
|
101
|
+
}
|
|
93
102
|
return dayjs(val).format(props?.config?.format || 'YYYY-MM-DD')
|
|
94
103
|
}
|
|
95
104
|
if (props.showMoney == '1') {
|
package/src/utils/defaultVal.js
CHANGED
|
@@ -4,7 +4,11 @@ import { ARG_FLAGS, isHidden, VALUE_TYPES } from './const'
|
|
|
4
4
|
import { isArray, isNumber, isString } from './is'
|
|
5
5
|
|
|
6
6
|
export default function defaultVal(config) {
|
|
7
|
-
if (
|
|
7
|
+
if (
|
|
8
|
+
(config.defaultVal || config.defaultValue) &&
|
|
9
|
+
!config.bindValue && config.bindValue !== 0 &&
|
|
10
|
+
!(isArray(config.bindValue) && config.bindValue.length) // 数组等于空的数组的时候
|
|
11
|
+
) {
|
|
8
12
|
const configDefaultVal = config.defaultVal || config.defaultValue
|
|
9
13
|
let defaultVal = null
|
|
10
14
|
try {
|