resolver-egretimp-plus 0.0.61 → 0.0.63

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.61",
3
+ "version": "0.0.63",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -48,6 +48,7 @@ export default {
48
48
  delete ret.onClick
49
49
  return ret
50
50
  })
51
+ const polyfillConfigs = inject('_polyfillConfigs', {})
51
52
  const buttonActions = inject('buttonActions', {})
52
53
  const route = useRoute()
53
54
  const routeQuery= route?.query
@@ -183,6 +184,7 @@ export default {
183
184
  executeEventOrchestration({
184
185
  props,
185
186
  axiosInstance: _axiosInstance?.value,
187
+ polyfillConfigs,
186
188
  rootValue: rootValue?.value,
187
189
  confirmInstance: confirmInstance?.value,
188
190
  dynamicMapComp,
@@ -128,6 +128,7 @@ export function getTableConfig(outParamMappingList = [], { dynamicMapComp, dynam
128
128
 
129
129
  export function openDailg({
130
130
  rootValue,
131
+ polyfillConfigs,
131
132
  pagePopupMap,
132
133
  axiosInstance,
133
134
  dynamicMapComp,
@@ -181,9 +182,9 @@ export function openDailg({
181
182
 
182
183
  let rootStore = {}
183
184
  let dialogClose = null
184
- const polyfillConfigs = {}
185
+ const initPolyfillConfigs = {}
185
186
  if (pagePopupMap.outDisplayTrigger) {
186
- polyfillConfigs[pagePopupMap.outDisplayTrigger] = (config) => {
187
+ initPolyfillConfigs[pagePopupMap.outDisplayTrigger] = (config) => {
187
188
  return {
188
189
  onClick() {
189
190
  const outResult = rootStore.tableSelectedInfo?.map(item => {
@@ -204,7 +205,7 @@ export function openDailg({
204
205
  }
205
206
  }
206
207
  if (pagePopupMap.closedTrigger) {
207
- polyfillConfigs[pagePopupMap.closedTrigger] = (config) => {
208
+ initPolyfillConfigs[pagePopupMap.closedTrigger] = (config) => {
208
209
  return {
209
210
  onClick() {
210
211
  dialogClose?.()
@@ -220,7 +221,10 @@ export function openDailg({
220
221
  axiosInstance: axiosInstance,
221
222
  lang,
222
223
  loadEvnetsReq: reqData,
223
- polyfillConfigs,
224
+ polyfillConfigs: {
225
+ ...initPolyfillConfigs,
226
+ ...(polyfillConfigs || {})
227
+ },
224
228
  rootStoreChange: (val) => {
225
229
  rootStore = val
226
230
  }
@@ -299,7 +303,7 @@ function closePage(lcpPageClosedMapVO) {
299
303
  }
300
304
  }
301
305
 
302
- export async function executeEventOrchestration({props, axiosInstance, buttonActions, rootValue, confirmInstance, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
306
+ export async function executeEventOrchestration({props, axiosInstance, polyfillConfigs, buttonActions, rootValue, confirmInstance, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
303
307
  const lcpPageRuleVOLis = props.config?.lcpPageRuleVOList || []
304
308
  const PageServiceMapVOList = props.config.lcpPageServiceMapVOList || []
305
309
  const mixinServiceConfig = PageServiceMapVOList.find(service => service.serviceType === '1')
@@ -336,6 +340,7 @@ export async function executeEventOrchestration({props, axiosInstance, buttonAct
336
340
  const dynamicHireRelat = props.config?.dynamicHireRelat
337
341
  openDailg({
338
342
  rootValue,
343
+ polyfillConfigs,
339
344
  pagePopupMap: lcpPagePopupMapVO,
340
345
  axiosInstance,
341
346
  dynamicMapComp,
@@ -8,10 +8,18 @@ const props = defineProps({
8
8
  ...commonPropsType,
9
9
  })
10
10
 
11
+ const normalVal = computed(() => {
12
+ const findItem = props?.options?.find(item => item.columnValue == modelValue.value)
13
+ if (findItem) {
14
+ return lang?.value?.indexOf('zh') > -1 ? findItem.columnDesc_zh : findItem.columnDesc
15
+ }
16
+ return modelValue.value
17
+ })
18
+
11
19
  const calcProps = computed(() => {
12
20
  return {
13
21
  title: lang?.value?.indexOf('zh') > -1 ? props.config?.metaNameZh : props.config?.metaNameEn,
14
- desc: modelValue.value || props.config?.desc,
22
+ desc: normalVal.value || props.config?.desc,
15
23
  content: props.config?.content,
16
24
  to: props.config?.toHref,
17
25
  islink: props.config?.islink === '1',
@@ -25,20 +33,12 @@ const onChange = (e) => {
25
33
  modelValue.value = e.detail.value
26
34
  }
27
35
 
28
- const normalVal = computed(() => {
29
- const findItem = props?.options?.find(item => item.columnValue == modelValue.value)
30
- if (findItem) {
31
- return lang?.value?.indexOf('zh') > -1 ? findItem.columnDesc_zh : findItem.columnDesc
32
- }
33
- return modelValue.value
34
- })
35
-
36
36
  </script>
37
37
 
38
38
  <template>
39
39
  <cmi-cell-group>
40
40
  <cmi-cell
41
- :value="normalVal" v-bind="{ ...attrs, ...calcProps}"
41
+ v-bind="{ ...attrs, ...calcProps}"
42
42
  @change="onChange"
43
43
  ></cmi-cell>
44
44
  </cmi-cell-group>
package/src/index.jsx CHANGED
@@ -217,6 +217,7 @@ export default {
217
217
 
218
218
  provide('_parentRootValue', props.parentRootValue)
219
219
  provide('_selectionsObj', props.selectionsObj)
220
+ provide('_polyfillConfigs', props.polyfillConfigs)
220
221
 
221
222
  const rootForm = ref(null)
222
223
  provide('rootForm', rootForm)
@@ -270,6 +270,7 @@ function parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue }, co
270
270
  if (!findKeys.length) {
271
271
  return
272
272
  }
273
+ // 层级写的越明确,就使用更明确的层级配置
273
274
  const findKey = findKeys.reduce((ret, key) => (hireRelat.lastIndexOf(ret) < hireRelat.lastIndexOf(key) ? ret : key))
274
275
  const polyObj = polyfillConfigs[findKey] && polyfillConfigs[findKey](config, instance, {parentRootValue})
275
276
  polyObj && Object.keys(polyObj).forEach(key => {
@@ -465,10 +466,13 @@ export function generateLayoutPolyfill(config, disabled, isH5) {
465
466
  props = {
466
467
  ...props,
467
468
  ...getDefaultColProps(config),
468
- ...elColSpecialProsp(config),
469
469
  }
470
470
 
471
471
  }
472
+ props = {
473
+ ...props,
474
+ ...elColSpecialProsp(config),
475
+ }
472
476
  return node => {
473
477
  // 表格中中的列,是否需要转换为普通形式
474
478
  if (isPlainColumn(config, disabled)) {