resolver-egretimp-plus 0.0.243 → 0.0.245

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.0.243",
3
+ "version": "0.0.245",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -96,7 +96,11 @@ export default {
96
96
  const context = {
97
97
  dataLoad: dataLoad
98
98
  }
99
- props.config.onVnodeMounted.call(context, props, e, selects)
99
+ try {
100
+ props.config.onVnodeMounted.call(context, props, e, selects)
101
+ } catch (error) {
102
+ console.error('onVnodeMounted error,', error, props.config)
103
+ }
100
104
  }
101
105
  if (props.config.onMounted) {
102
106
  let onMounted = props.config.onMounted
@@ -106,11 +110,11 @@ export default {
106
110
  try {
107
111
  ${props.config.onMounted}
108
112
  } catch (error) {
109
- console.error('error===:', props, error)
113
+ console.error('onMounted error===:', props, error)
110
114
  }
111
115
  })`)
112
116
  } catch (error) {
113
- console.error('error===:',props, error)
117
+ console.error('parse onMounted error===:',props, error)
114
118
  }
115
119
  }
116
120
  typeof onMounted === 'function' && onMounted({props, e, selects})
@@ -156,7 +160,11 @@ export default {
156
160
  const onVnodeUnmounted = () => {
157
161
  props.config.vmIsBind = false
158
162
  if (props.config.onVnodeUnmounted && typeof props.config.onVnodeUnmounted === 'function') {
159
- props.config.onVnodeUnmounted(props)
163
+ try {
164
+ props.config.onVnodeUnmounted(props)
165
+ } catch (error) {
166
+ console.error('onVnodeUnmounted error,', error, props.config)
167
+ }
160
168
  }
161
169
  }
162
170
 
@@ -103,10 +103,16 @@ const modelvalDesc = computed(() => {
103
103
  }, '')
104
104
  })
105
105
 
106
+ const inputProps = computed(() => {
107
+ return {
108
+ placeholder: lang?.value?.indexOf('zh') > -1 ? props.config?.defPlacehold : props.config?.defPlaceholdEn
109
+ }
110
+ })
111
+
106
112
  </script>
107
113
 
108
114
  <template>
109
- <cmi-input :value="modelvalDesc" suffixIcon @focus="onFocus">
115
+ <cmi-input :value="modelvalDesc" suffixIcon @focus="onFocus" v-bind="{...attrs, ...inputProps}" >
110
116
  <div slot="suffix-icon" v-if="suffixIcon">
111
117
  <component :is="`cmi-icon-${suffixIcon}`" color="#4E5969"></component>
112
118
  </div>
@@ -68,14 +68,14 @@ const proxyValue = computed({
68
68
  const val = modelValue.value || ''
69
69
  return val ? (isStrVal.value ? val.split(',') : val) : []
70
70
  } else {
71
- return modelValue.value
71
+ return modelValue.value || ''
72
72
  }
73
73
  },
74
74
  set(val) {
75
75
  if (isMutiple.value) {
76
76
  modelValue.value = isStrVal.value ? val.join(',') : val
77
77
  } else {
78
- modelValue.value = val
78
+ modelValue.value = val || ''
79
79
  }
80
80
  }
81
81
  })
@@ -2,7 +2,7 @@
2
2
  --el-button-disabled-text-color: #BBBFC4;
3
3
  --el-button-hover-bg-color: #EFF0F1;
4
4
  --el-button-text-color: #1F2329;
5
- --el-font-size-base: 16px;
5
+ --el-font-size-base: 14px;
6
6
  }
7
7
  .el-button--large {
8
8
  padding: 8px 12px;
@@ -781,7 +781,7 @@ function getFormItemRule(config, lang, params) {
781
781
  const val = config?.refValue
782
782
  const message = lang.indexOf('zh') > -1 ? `${config.metaNameZh}不能为空` : `${config.metaNameEn} can not be empty`
783
783
  if (!onlyRequiredFlag && required) {
784
- if (val === '' || val === null || val === undefined) {
784
+ if (val === '' || val === null || val === undefined || (Array.isArray(val) && !val.length)) {
785
785
  callback(new Error(message))
786
786
  } else {
787
787
  // isMatch在下来框的时候,表示当前值没有在下拉选项中匹配到,就表示没有选中值;因为后端在表字段为数字类型的时候,默认返回的是0值