resolver-egretimp-plus 0.0.61 → 0.0.62
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
|
@@ -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
|
|
185
|
+
const initPolyfillConfigs = {}
|
|
185
186
|
if (pagePopupMap.outDisplayTrigger) {
|
|
186
|
-
|
|
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
|
-
|
|
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,
|
package/src/index.jsx
CHANGED
package/src/utils/render.jsx
CHANGED
|
@@ -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)) {
|