resolver-egretimp-plus 0.0.106 → 0.0.107
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
|
@@ -86,9 +86,17 @@ export default {
|
|
|
86
86
|
if (props.config.onMounted) {
|
|
87
87
|
let onMounted = props.config.onMounted
|
|
88
88
|
if (typeof onMounted === 'string') {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
try {
|
|
90
|
+
onMounted = eval(`(function({props, e, selects}) {
|
|
91
|
+
try {
|
|
92
|
+
${props.config.onMounted}
|
|
93
|
+
} catch (error) {
|
|
94
|
+
console.error('error===:', props, error)
|
|
95
|
+
}
|
|
96
|
+
})`)
|
|
97
|
+
} catch (error) {
|
|
98
|
+
console.error('error===:',props, error)
|
|
99
|
+
}
|
|
92
100
|
}
|
|
93
101
|
typeof onMounted === 'function' && onMounted({props, e, selects})
|
|
94
102
|
}
|
|
@@ -284,17 +284,7 @@ export function openDailg({
|
|
|
284
284
|
initOutParamData(outParamMappingList, {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, outResult: outData})
|
|
285
285
|
dialogClose?.()
|
|
286
286
|
|
|
287
|
-
|
|
288
|
-
const afterOpenDialog = compConfig?.afterOpenDialog
|
|
289
|
-
afterOpenDialog && afterOpenDialog({
|
|
290
|
-
dynamicMapComp,
|
|
291
|
-
rootValue,
|
|
292
|
-
dynamicHireRelat,
|
|
293
|
-
compConfig,
|
|
294
|
-
pagePopupMap,
|
|
295
|
-
inputParams: reqData,
|
|
296
|
-
outputParams: outData
|
|
297
|
-
})
|
|
287
|
+
toAfterOpenDialog(outData)
|
|
298
288
|
}
|
|
299
289
|
}
|
|
300
290
|
}
|
|
@@ -305,6 +295,7 @@ export function openDailg({
|
|
|
305
295
|
return {
|
|
306
296
|
onClick() {
|
|
307
297
|
dialogClose?.()
|
|
298
|
+
toAfterOpenDialog()
|
|
308
299
|
}
|
|
309
300
|
}
|
|
310
301
|
}
|
|
@@ -344,10 +335,30 @@ export function openDailg({
|
|
|
344
335
|
toOpenDialog()
|
|
345
336
|
}
|
|
346
337
|
|
|
338
|
+
function toAfterOpenDialog(outputParams) {
|
|
339
|
+
// 定义的请求后钩子
|
|
340
|
+
const afterOpenDialog = compConfig?.afterOpenDialog
|
|
341
|
+
afterOpenDialog && afterOpenDialog({
|
|
342
|
+
dynamicMapComp,
|
|
343
|
+
rootValue,
|
|
344
|
+
dynamicHireRelat,
|
|
345
|
+
compConfig,
|
|
346
|
+
pagePopupMap,
|
|
347
|
+
inputParams: reqData,
|
|
348
|
+
outputParams,
|
|
349
|
+
})
|
|
350
|
+
}
|
|
351
|
+
|
|
347
352
|
function toOpenDialog() {
|
|
348
353
|
dialogClose = openChildDialog({
|
|
354
|
+
|
|
349
355
|
buttonActions,
|
|
350
|
-
dialogProps
|
|
356
|
+
dialogProps: {
|
|
357
|
+
...(dialogProps || {}),
|
|
358
|
+
beforeClose: () => {
|
|
359
|
+
toAfterOpenDialog()
|
|
360
|
+
},
|
|
361
|
+
},
|
|
351
362
|
parentRootValue: rootValue,
|
|
352
363
|
selectionsObj,
|
|
353
364
|
busiIdentityId,
|
|
@@ -66,22 +66,25 @@ let promiseReject = null
|
|
|
66
66
|
// 初始化handlePromise为一个计算属性,为了获取引用次数
|
|
67
67
|
let referenceCount = 0
|
|
68
68
|
let handleProValue = null
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
69
|
+
function initHandlePromise() {
|
|
70
|
+
props.config.handlePromise = computed({
|
|
71
|
+
get() {
|
|
72
|
+
referenceCount ++
|
|
73
|
+
return handleProValue
|
|
74
|
+
},
|
|
75
|
+
set(val) {
|
|
76
|
+
referenceCount = 0
|
|
77
|
+
handleProValue = val
|
|
78
|
+
}
|
|
79
|
+
})
|
|
80
|
+
}
|
|
79
81
|
|
|
80
82
|
const dialogValue = computed({
|
|
81
83
|
get() {
|
|
82
84
|
const val = props?.config?.dialogVisible
|
|
83
85
|
if (showCloseButton.value || showConfirmButton.value) {
|
|
84
86
|
if (val) {
|
|
87
|
+
initHandlePromise()
|
|
85
88
|
props.config.handlePromise = new Promise((res, rej) => {
|
|
86
89
|
promiseResolve = res
|
|
87
90
|
promiseReject = rej
|
|
@@ -142,6 +145,9 @@ const toConfirm = async () => {
|
|
|
142
145
|
if (res) {
|
|
143
146
|
dialogValue.value = false
|
|
144
147
|
}
|
|
148
|
+
if (!res) {
|
|
149
|
+
initHandlePromise()
|
|
150
|
+
}
|
|
145
151
|
props.config.handlePromise = new Promise((res, rej) => {
|
|
146
152
|
promiseResolve = res
|
|
147
153
|
promiseReject = rej
|
|
@@ -161,6 +167,9 @@ const toClose = async () => {
|
|
|
161
167
|
if (res) {
|
|
162
168
|
dialogValue.value = false
|
|
163
169
|
}
|
|
170
|
+
if (!res) {
|
|
171
|
+
initHandlePromise()
|
|
172
|
+
}
|
|
164
173
|
props.config.handlePromise = new Promise((res, rej) => {
|
|
165
174
|
promiseResolve = res
|
|
166
175
|
promiseReject = rej
|