resolver-egretimp-plus 0.1.117 → 0.1.119
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/dist/const/index.js +1 -1
- package/dist/h5/index.js +16 -16
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/components/helper/resolver.js +3 -0
- package/src/hooks/pageConfig.js +8 -0
- package/src/hooks/watchRuels.js +20 -9
- package/src/index.jsx +7 -0
- package/src/rulesOfDate/eventsSupplement.js +168 -136
- package/src/rulesOfDate/parseCondition.js +0 -1
- package/src/rulesOfDate/ruleUtils.js +65 -36
- package/src/rulesOfDate/rulesDriver.js +3 -1
- package/src/utils/common.js +66 -11
- package/src/utils/render.jsx +2 -2
package/package.json
CHANGED
|
@@ -76,7 +76,10 @@ export async function executeLoadServices(services = [], {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
window?.performance?.mark('get_load_detal_start')
|
|
79
80
|
const ret = await (axiosInstance.value && axiosInstance.value(reqConfig))
|
|
81
|
+
window?.performance?.mark('get_load_detal_end')
|
|
82
|
+
console.log('get_load_detal', window?.performance?.measure('get_load_detal', 'get_load_detal_start', 'get_load_detal_end'))
|
|
80
83
|
if (resultToast(ret.data, messageInstance, { noSuccessIip: true })) {
|
|
81
84
|
respCb && respCb(ret?.data?.result)
|
|
82
85
|
return
|
package/src/hooks/pageConfig.js
CHANGED
|
@@ -62,9 +62,17 @@ export function useBuildInData({ messageInstance, loadingInstance, requestTraceI
|
|
|
62
62
|
} else if (loadingInstance.show && typeof loadingInstance.show === 'function') {
|
|
63
63
|
loadingInstance.show()
|
|
64
64
|
}
|
|
65
|
+
window?.performance?.mark('get_config_start')
|
|
65
66
|
buildInRequest(QUERY_PAGE_CONFIG_DATA, {...reqData, requestTraceId}).then(ret => {
|
|
67
|
+
window?.performance?.mark('get_config_end')
|
|
68
|
+
console.log('get_config', window?.performance?.measure('get_config', 'get_config_start', 'get_config_end'))
|
|
66
69
|
if (resultToast(ret.data, messageInstance, { noSuccessIip: true })) {
|
|
67
70
|
// pageConfig.value = normalPageConfigs(mock)
|
|
71
|
+
window?.performance?.mark('update_configs_start')
|
|
72
|
+
setTimeout(() => {
|
|
73
|
+
window?.performance?.mark('update_configs_end')
|
|
74
|
+
console.log('update_configs', window?.performance?.measure('update_configs', 'update_configs_start', 'update_configs_end'))
|
|
75
|
+
}, 0);
|
|
68
76
|
pageConfig.value = normalPageConfigs(ret.data.result)
|
|
69
77
|
try {
|
|
70
78
|
configCb && configCb(pageConfig.value)
|
package/src/hooks/watchRuels.js
CHANGED
|
@@ -6,7 +6,9 @@ export function toWatchRules({
|
|
|
6
6
|
rules,
|
|
7
7
|
rootValue,
|
|
8
8
|
mapComp,
|
|
9
|
+
dynamicMapComp,
|
|
9
10
|
route,
|
|
11
|
+
messageInstance,
|
|
10
12
|
lang,
|
|
11
13
|
}) {
|
|
12
14
|
const ruleKeys = Object.keys(rules)
|
|
@@ -33,6 +35,7 @@ export function toWatchRules({
|
|
|
33
35
|
rulesDriver({
|
|
34
36
|
rules: rules[originKey],
|
|
35
37
|
mapComp,
|
|
38
|
+
dynamicMapComp,
|
|
36
39
|
rootValue,
|
|
37
40
|
route,
|
|
38
41
|
lang,
|
|
@@ -47,7 +50,11 @@ export function toWatchRules({
|
|
|
47
50
|
function watchRuleTrace({comps, rootValue, watchCb}, prefix = '', idx = 0, unWatchsList = []) {
|
|
48
51
|
if (comps && comps.length) {
|
|
49
52
|
const comp = comps[idx]
|
|
50
|
-
|
|
53
|
+
try {
|
|
54
|
+
prefix += prefix ? `->${comp.metaCode}` : comp.metaCode
|
|
55
|
+
} catch (error) {
|
|
56
|
+
debugger
|
|
57
|
+
}
|
|
51
58
|
if (comps.length === (idx + 1)) {
|
|
52
59
|
const unWatch = watch(() => getPathVal(unref(rootValue), prefix, '->'), (val) => {
|
|
53
60
|
// 开始执行规则
|
|
@@ -72,17 +79,21 @@ function watchRuleTrace({comps, rootValue, watchCb}, prefix = '', idx = 0, unWat
|
|
|
72
79
|
const childUnWatchs = []
|
|
73
80
|
unWatchsList.push(childUnWatchs)
|
|
74
81
|
const currentPrefix = `${prefix}[${index}]`
|
|
75
|
-
idx
|
|
76
|
-
watchRuleTrace({comps, rootValue, watchCb}, currentPrefix,
|
|
82
|
+
const currentIdx = idx + 1
|
|
83
|
+
watchRuleTrace({comps, rootValue, watchCb}, currentPrefix, currentIdx, [...unWatchsList])
|
|
77
84
|
_rowMapWatchs.set(row, {key: currentPrefix, childUnWatchs})
|
|
78
85
|
}
|
|
79
86
|
})
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
try {
|
|
88
|
+
const mapKeys = _rowMapWatchs.keys()
|
|
89
|
+
Array.from(mapKeys).forEach(row => {
|
|
90
|
+
if (!list.some(row2 => row2 === row)) {
|
|
91
|
+
_rowMapWatchs.get(row)?.childUnWatchs?.forEach(un => un?.())
|
|
92
|
+
}
|
|
93
|
+
})
|
|
94
|
+
} catch (error) {
|
|
95
|
+
debugger
|
|
96
|
+
}
|
|
86
97
|
}, {
|
|
87
98
|
immediate: true
|
|
88
99
|
})
|
package/src/index.jsx
CHANGED
|
@@ -283,6 +283,11 @@ export default {
|
|
|
283
283
|
emit('loadEvnetsCompleted', result)
|
|
284
284
|
}, 20);
|
|
285
285
|
} else {
|
|
286
|
+
window?.performance?.mark('update_load_detal_start')
|
|
287
|
+
setTimeout(() => {
|
|
288
|
+
window?.performance?.mark('update_load_detal_end')
|
|
289
|
+
console.log('update_load_detal', window?.performance?.measure('update_load_detal', 'update_load_detal_start', 'update_load_detal_end'))
|
|
290
|
+
}, 0);
|
|
286
291
|
nativeDataLoad.value = true
|
|
287
292
|
emit('update:modelValue', val)
|
|
288
293
|
emit('loadEvnetsCompleted', result)
|
|
@@ -408,7 +413,9 @@ export default {
|
|
|
408
413
|
// rules: hireRelatMapRulesRef.value,
|
|
409
414
|
// rootValue: toRef(props, 'modelValue'),
|
|
410
415
|
// mapComp: mapCompRef.value,
|
|
416
|
+
// dynamicMapComp,
|
|
411
417
|
// route,
|
|
418
|
+
// messageInstance: props.messageInstance,
|
|
412
419
|
// lang: props.lang,
|
|
413
420
|
// })
|
|
414
421
|
onMounted(() => {
|