resolver-egretimp-plus 0.0.244 → 0.0.246

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.244",
3
+ "version": "0.0.246",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -73,6 +73,8 @@ export default {
73
73
  const validate = inject('_validate')
74
74
 
75
75
  const selects = inject('selects')
76
+ const _parentRootValue = inject('_parentRootValue')
77
+ const _parentDynamicMapComp = inject('_parentDynamicMapComp')
76
78
 
77
79
  definePrivatelyProp(props.config, '_rootValue', rootValue)
78
80
  definePrivatelyProp(props.config, 'router', router)
@@ -80,6 +82,8 @@ export default {
80
82
  definePrivatelyProp(props.config, '_validate', validate)
81
83
  definePrivatelyProp(props.config, '_rowScope', props.rowScope)
82
84
  definePrivatelyProp(props.config, '_selects', selects)
85
+ definePrivatelyProp(props.config, '_parentRootValue', _parentRootValue)
86
+ definePrivatelyProp(props.config, '_parentDynamicMapComp', _parentDynamicMapComp)
83
87
  // 当前组件的实例
84
88
  const instance = getCurrentInstance()
85
89
  const appContext = instance?.appContext
@@ -52,7 +52,10 @@ const props = defineProps({
52
52
  type: Object,
53
53
  default: () => ({})
54
54
  },
55
-
55
+ parentSelects: {
56
+ type: Object,
57
+ default: () => ({})
58
+ },
56
59
  selectionsObj: {
57
60
  type: Object,
58
61
  // selections
@@ -94,9 +97,6 @@ const dialogProps = computed(() => {
94
97
  if (props.dialogProps?.titleEn && props.lang?.indexOf('zh') == -1) {
95
98
  ret.title = props.dialogProps?.titleEn
96
99
  }
97
- if (!ret.title) {
98
- ret['headerClass'] = ret['headerClass'] ? `${ret['headerClass']} hidden-head` : 'hidden-head'
99
- }
100
100
  return ret
101
101
  })
102
102
 
@@ -129,6 +129,9 @@ defineExpose({
129
129
  v-bind="dialogProps"
130
130
  :width="dialogWidth"
131
131
  v-model="dialogVisible"
132
+ :class="{
133
+ 'hidden-head': !dialogProps.title
134
+ }"
132
135
  :style="dialogStyle"
133
136
  >
134
137
  <div>
@@ -142,6 +145,7 @@ defineExpose({
142
145
  :selectionsObj="props.selectionsObj"
143
146
  :busiIdentityId="busiIdentityId"
144
147
  :lang="props.lang"
148
+ :selects="parentSelects"
145
149
  :buttonActions="props.buttonActions"
146
150
  :dialogReq="props.loadEvnetsReq"
147
151
  :polyfillConfigs="props.polyfillConfigs"
@@ -168,7 +172,7 @@ defineExpose({
168
172
  .el-dialog__header {
169
173
  min-height: 40px;
170
174
  }
171
- .hidden-head {
175
+ &.hidden-head {
172
176
  & > .el-dialog__header {
173
177
  display: none;
174
178
  }
@@ -493,6 +493,7 @@ export function openDailg({
493
493
  loadEvnetsReq: reqData,
494
494
  initData: reqData,
495
495
  components,
496
+ parentSelects: compConfig?._selects,
496
497
  polyfillConfigs: {
497
498
  ...initPolyfillConfigs,
498
499
  ...(polyfillConfigs || {})
@@ -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>
@@ -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值