resolver-egretimp-plus 0.0.188 → 0.0.192
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
|
@@ -74,6 +74,8 @@ export default {
|
|
|
74
74
|
const selects = inject('selects')
|
|
75
75
|
|
|
76
76
|
definePrivatelyProp(props.config, '_rootValue', rootValue)
|
|
77
|
+
definePrivatelyProp(props.config, 'router', router)
|
|
78
|
+
definePrivatelyProp(props.config, 'route', route)
|
|
77
79
|
// 当前组件的实例
|
|
78
80
|
const instance = getCurrentInstance()
|
|
79
81
|
const appContext = instance?.appContext
|
|
@@ -84,8 +86,7 @@ export default {
|
|
|
84
86
|
}
|
|
85
87
|
const onVnodeMounted = (e) => {
|
|
86
88
|
definePrivatelyProp(props.config, 'vmIsBind', true)
|
|
87
|
-
|
|
88
|
-
definePrivatelyProp(props.config, 'route', route)
|
|
89
|
+
|
|
89
90
|
|
|
90
91
|
if (props.config.onVnodeMounted && typeof props.config.onVnodeMounted === 'function') {
|
|
91
92
|
const context = {
|
|
@@ -11,6 +11,10 @@ export async function executeLoadServices(services = [], { requestTraceId, busin
|
|
|
11
11
|
delete noramlReqData.notLoad
|
|
12
12
|
const loadServices = services.filter(ser => ser.eventType == '1')
|
|
13
13
|
const mixinServiceConfig = services.find(service => service.serviceType === '1')
|
|
14
|
+
if (!loadServices || !loadServices.length) {
|
|
15
|
+
notLoadCb && notLoadCb()
|
|
16
|
+
return
|
|
17
|
+
}
|
|
14
18
|
for (let i = 0; i < loadServices.length; i++) {
|
|
15
19
|
const service = loadServices[i]
|
|
16
20
|
const url = service.serviceCode
|
package/src/utils/defaultVal.js
CHANGED
|
@@ -6,7 +6,12 @@ export default function defaultVal(config) {
|
|
|
6
6
|
const configDefaultVal = config.defaultVal || config.defaultValue
|
|
7
7
|
let defaultVal = null
|
|
8
8
|
try {
|
|
9
|
-
|
|
9
|
+
let routeMatchs = null
|
|
10
|
+
if ( typeof configDefaultVal === 'string' && (routeMatchs = configDefaultVal.match(/^_route:(.*)$/))) {
|
|
11
|
+
const queryKey = routeMatchs[1]
|
|
12
|
+
const routeQuery = config?.route?.query
|
|
13
|
+
defaultVal = routeQuery?.[queryKey]
|
|
14
|
+
} else if (/^{[\w\W]*}$/.test(configDefaultVal) || /^\[[\w\W]*\]$/.test(configDefaultVal)) {
|
|
10
15
|
defaultVal = JSON.parse(configDefaultVal)
|
|
11
16
|
} else {
|
|
12
17
|
if (configDefaultVal === ARG_FLAGS.CURRENT_DATE || configDefaultVal === 'currentDate') {
|