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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.1.61",
3
+ "version": "0.1.62",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -89,7 +89,16 @@ const value = computed(() => {
89
89
  if (!modelValue.value) {
90
90
  return ''
91
91
  }
92
- const val = isNaN(Number(modelValue.value)) ? modelValue.value : Number(modelValue.value)
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') {
@@ -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 ((config.defaultVal || config.defaultValue) && !config.bindValue && config.bindValue !== 0) {
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 {