resolver-egretimp-plus 0.0.238 → 0.0.240

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.238",
3
+ "version": "0.0.240",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -48,6 +48,11 @@ const props = defineProps({
48
48
  type: Object,
49
49
  default: () => ({})
50
50
  },
51
+ parentDynamicMapComp: {
52
+ type: Object,
53
+ default: () => ({})
54
+ },
55
+
51
56
  selectionsObj: {
52
57
  type: Object,
53
58
  // selections
@@ -89,6 +94,9 @@ const dialogProps = computed(() => {
89
94
  if (props.dialogProps?.titleEn && props.lang?.indexOf('zh') == -1) {
90
95
  ret.title = props.dialogProps?.titleEn
91
96
  }
97
+ if (!ret.title) {
98
+ ret['headerClass'] = ret['headerClass'] ? `${ret['headerClass']} hidden-head` : 'hidden-head'
99
+ }
92
100
  return ret
93
101
  })
94
102
 
@@ -130,6 +138,7 @@ defineExpose({
130
138
  @rootStoreChange="rootStoreChange"
131
139
  v-model="formData"
132
140
  :parentRootValue="props.parentRootValue"
141
+ :parentDynamicMapComp="props.parentDynamicMapComp"
133
142
  :selectionsObj="props.selectionsObj"
134
143
  :busiIdentityId="busiIdentityId"
135
144
  :lang="props.lang"
@@ -159,5 +168,10 @@ defineExpose({
159
168
  .el-dialog__header {
160
169
  min-height: 40px;
161
170
  }
171
+ .hidden-head {
172
+ & > .el-dialog__header {
173
+ display: none;
174
+ }
175
+ }
162
176
  }
163
177
  </style>
@@ -485,6 +485,7 @@ export function openDailg({
485
485
  },
486
486
  },
487
487
  parentRootValue: rootValue,
488
+ parentDynamicMapComp: dynamicMapComp,
488
489
  selectionsObj,
489
490
  busiIdentityId,
490
491
  axiosInstance: axiosInstance,
@@ -59,6 +59,7 @@ const dataLoad = inject('dataLoad')
59
59
  const rootForm = inject('rootForm')
60
60
  const validate = inject('_validate', () => {})
61
61
  const parentRootValue = inject('_parentRootValue', {})
62
+ const parentDynamicMapComp = inject('_parentDynamicMapComp', {})
62
63
  const rootInstance = inject('_rootInstance', {})
63
64
 
64
65
  const routeQuery= route?.query
@@ -84,6 +85,7 @@ const buttonAction = (e, params) => {
84
85
  validate,
85
86
  lastClick,
86
87
  parentRootValue,
88
+ parentDynamicMapComp,
87
89
  rootInstance
88
90
  }, appContext)
89
91
  }
@@ -70,6 +70,7 @@ export default {
70
70
  const ruleExecuter = inject('_ruleExecuter')
71
71
  const dynamicMapComp = inject('dynamicMapComp')
72
72
  const parentRootValue = inject('_parentRootValue', {})
73
+ const parentDynamicMapComp = inject('_parentDynamicMapComp', {})
73
74
  const selectionsObj = inject('_selectionsObj', {})
74
75
  const rootStore = inject('_rootStore', {})
75
76
  const lang = inject('lang')
@@ -203,7 +204,8 @@ export default {
203
204
  orginRet = orginSelectable(row, index, {
204
205
  tableConfig: props.config,
205
206
  rootValue: rootValue,
206
- parentRootValue
207
+ parentRootValue,
208
+ parentDynamicMapComp
207
209
  })
208
210
  }
209
211
  let parentSelectionsRet = true
@@ -78,6 +78,7 @@ const dataLoad = inject('dataLoad')
78
78
  const rootForm = inject('rootForm')
79
79
  const validate = inject('_validate', () => {})
80
80
  const parentRootValue = inject('_parentRootValue', {})
81
+ const parentDynamicMapComp = inject('_parentDynamicMapComp', {})
81
82
  const rootInstance = inject('_rootInstance', {})
82
83
 
83
84
  const routeQuery= route?.query
@@ -104,6 +105,7 @@ const buttonAction = async (e, params) => {
104
105
  validate,
105
106
  lastClick,
106
107
  parentRootValue,
108
+ parentDynamicMapComp,
107
109
  rootInstance
108
110
  }, appContext)
109
111
  }
@@ -23,6 +23,7 @@ export function usePageConfig() {
23
23
  isH5,
24
24
  rootValue,
25
25
  parentRootValue,
26
+ parentDynamicMapComp,
26
27
  axiosInstance,
27
28
  messageInstance,
28
29
  messageCb
@@ -36,6 +37,7 @@ export function usePageConfig() {
36
37
  config, lang, polyfillConfigs, instance, isH5,
37
38
  rootValue,
38
39
  parentRootValue,
40
+ parentDynamicMapComp,
39
41
  axiosInstance,
40
42
  messageInstance,
41
43
  messageCb
package/src/index.jsx CHANGED
@@ -124,6 +124,11 @@ export default {
124
124
  type: Object,
125
125
  default: () => ({})
126
126
  },
127
+ // 如果当前页面是弹框,这个是父页面传入的配置
128
+ parentDynamicMapComp: {
129
+ type: Object,
130
+ default: () => ({})
131
+ },
127
132
  // 如果当前页面是弹框,这个是父页面已经选中的数据,控制表格选中的禁用
128
133
  selectionsObj: {
129
134
  type: Object,
@@ -243,6 +248,7 @@ export default {
243
248
  isH5: props.isH5,
244
249
  rootValue: props.modelValue,
245
250
  parentRootValue: props.parentRootValue,
251
+ parentDynamicMapComp: props.parentDynamicMapComp,
246
252
  axiosInstance: axiosInstance.value,
247
253
  messageInstance: props.messageInstance,
248
254
  messageCb: props.messageCb
@@ -263,6 +269,7 @@ export default {
263
269
  isH5: props.isH5,
264
270
  rootValue: props.modelValue,
265
271
  parentRootValue: props.parentRootValue,
272
+ parentDynamicMapComp: props.parentDynamicMapComp,
266
273
  axiosInstance: axiosInstance.value,
267
274
  messageInstance: props.messageInstance,
268
275
  messageCb: props.messageCb
@@ -305,7 +312,8 @@ export default {
305
312
  provide('dialogComponents', props.dialogComponents) // 是否可以开始执行规则初始化
306
313
  provide('_isH5', toRef(props, 'isH5')) // 是否是H5配置
307
314
 
308
- provide('_parentRootValue', props.parentRootValue)
315
+ provide('_parentRootValue', props.parentRootValue)
316
+ provide('_parentDynamicMapComp', props.parentDynamicMapComp)
309
317
  provide('_selectionsObj', props.selectionsObj)
310
318
  provide('_polyfillConfigs', props.polyfillConfigs)
311
319
  provide('requestTraceId', toRef(props, 'requestTraceId')) // 所有渲染器调用的接口,都需要加次参数(生哥提)
@@ -3,6 +3,9 @@
3
3
  .custom-form-item {
4
4
  display: flex;
5
5
  align-items: center;
6
+ & > .el-form-item__content {
7
+ min-height: 32px;
8
+ }
6
9
  & > .el-form-item__label {
7
10
  // 表单label中使用弹性居中
8
11
  display: flex;
@@ -116,6 +116,7 @@ export function parsePageConfig({
116
116
  config, lang, polyfillConfigs, instance, isH5,
117
117
  rootValue,
118
118
  parentRootValue,
119
+ parentDynamicMapComp,
119
120
  axiosInstance,
120
121
  messageInstance,
121
122
  messageCb
@@ -139,7 +140,8 @@ export function parsePageConfig({
139
140
  axiosInstance,
140
141
  messageInstance,
141
142
  messageCb,
142
- parentRootValue
143
+ parentRootValue,
144
+ parentDynamicMapComp,
143
145
  }, formConfig)
144
146
  cbs.forEach((cb) => {
145
147
  cb()
@@ -169,7 +171,8 @@ export function normalConfig({
169
171
  axiosInstance,
170
172
  messageInstance,
171
173
  messageCb,
172
- parentRootValue
174
+ parentRootValue,
175
+ parentDynamicMapComp,
173
176
  }, config, hireRelat = '', mapComp = {}, needformItem = false) {
174
177
  const metaCode = config.metaCode || ''
175
178
  hireRelat += hireRelat ? `->${metaCode}` : metaCode
@@ -216,7 +219,8 @@ export function normalConfig({
216
219
  axiosInstance,
217
220
  messageInstance ,
218
221
  messageCb,
219
- parentRootValue
222
+ parentRootValue,
223
+ parentDynamicMapComp,
220
224
  }, metaItem, hireRelat, mapComp, needformItem || [FORM_META_TYPE, FORM_META_TYPE_H5].includes(metaType))
221
225
  return pageConfig
222
226
  })?.sort((a, b) => a.seqNo - b.seqNo)
@@ -269,7 +273,7 @@ export function normalConfig({
269
273
  }
270
274
 
271
275
  mapComp[hireRelat] = pageConfig
272
- parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue }, pageConfig)
276
+ parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue, parentDynamicMapComp }, pageConfig)
273
277
  if(pageConfig.lcpPageServiceMapVOList?.length) {
274
278
  cbs.push(() => {
275
279
  const tabsServices = getTableServices(pageConfig.lcpPageServiceMapVOList, {dynamicMapComp: mapComp, dynamicMapCompKeys: Object.keys(mapComp), hireRelat})
@@ -343,7 +347,7 @@ function getTableServices(lcpPageServiceMapVOList = [], { dynamicMapComp, dynami
343
347
  }
344
348
  return []
345
349
  }
346
- function parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue }, config) {
350
+ function parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue, parentDynamicMapComp}, config) {
347
351
  const hireRelat = config.hireRelat
348
352
  const findKeys = Object.keys(polyfillConfigs || {}).filter(key => hireRelat.endsWith(key))
349
353
  if (!findKeys.length) {
@@ -351,7 +355,7 @@ function parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue }, co
351
355
  }
352
356
  // 层级写的越明确,就使用更明确的层级配置
353
357
  const findKey = findKeys.reduce((ret, key) => (hireRelat.lastIndexOf(ret) < hireRelat.lastIndexOf(key) ? ret : key))
354
- const polyObj = polyfillConfigs[findKey] && polyfillConfigs[findKey](config, instance, {parentRootValue})
358
+ const polyObj = polyfillConfigs[findKey] && polyfillConfigs[findKey](config, instance, {parentRootValue, parentDynamicMapComp,})
355
359
  polyObj && Object.keys(polyObj).forEach(key => {
356
360
  config[key] = polyObj[key]
357
361
  })