resolver-egretimp-plus 0.0.244 → 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
|
@@ -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>
|
package/src/utils/render.jsx
CHANGED
|
@@ -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 || !val.length) {
|
|
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值
|