resolver-egretimp-plus 0.0.227 → 0.0.229

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.227",
3
+ "version": "0.0.229",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -1,3 +1,4 @@
1
+ import { hasOwn } from "../../utils"
1
2
  import { resultToast } from "../../utils/respone"
2
3
 
3
4
  export async function executeLoadServices(services = [], { alongLoad, requestTraceId, businessIdentityReqData = {}, axiosInstance, messageInstance, reqData, respCb, notLoadCb }) {
@@ -58,4 +59,12 @@ export function normalPageConfigs(pageConfig) {
58
59
  pageConfig.rootOptionComp = rootOptionComp
59
60
  }
60
61
  return pageConfig
62
+ }
63
+
64
+ export function resetConfigEventInit(dynamicMapComp) {
65
+ Object.keys(dynamicMapComp).forEach(key => {
66
+ if (hasOwn(dynamicMapComp[key], 'eventInit')) {
67
+ dynamicMapComp[key].eventInit = false
68
+ }
69
+ })
61
70
  }
package/src/index.jsx CHANGED
@@ -5,8 +5,9 @@ import { usePageConfig } from './hooks/pageConfig'
5
5
  import { toValidate } from './utils/valid.js'
6
6
  import { MODE } from "./utils/const.js"
7
7
  import { generateRequester } from "./utils/request.js"
8
- import { executeLoadServices } from "./components/helper/resolver.js"
8
+ import { executeLoadServices, resetConfigEventInit } from "./components/helper/resolver.js"
9
9
  import { deepMerge } from "./utils/index.js"
10
+ import { nextTick } from "vue"
10
11
  // import { RuleExecuter } from "./rulesImp/index.js"
11
12
  export default {
12
13
  name: 'Resolver',
@@ -144,6 +145,7 @@ export default {
144
145
  },
145
146
  emits: ['update:modelValue', 'rootStoreChange'],
146
147
  setup(props, { emit, attrs, expose }) {
148
+ const dynamicMapComp = reactive({})
147
149
  const instance = getCurrentInstance()
148
150
  const ruleExecuter = null
149
151
  // const ruleExecuter = new RuleExecuter()
@@ -189,7 +191,6 @@ export default {
189
191
  nativeDataLoad.value = true
190
192
  },
191
193
  respCb: (result) => {
192
- nativeDataLoad.value = true
193
194
  let val = result
194
195
  if (props.loadEventsAfter && typeof props.loadEventsAfter === 'function') {
195
196
  val = props.loadEventsAfter(val)
@@ -198,8 +199,13 @@ export default {
198
199
  val = deepMerge(props.modelValue, result, 'replace')
199
200
  val = {...val}
200
201
  }
201
- emit('update:modelValue', val)
202
- emit('loadEvnetsCompleted', result)
202
+ resetConfigEventInit(dynamicMapComp)
203
+ emit('update:modelValue', {})
204
+ nextTick(() => {
205
+ nativeDataLoad.value = true
206
+ emit('update:modelValue', val)
207
+ emit('loadEvnetsCompleted', result)
208
+ })
203
209
  }
204
210
  }
205
211
  )
@@ -257,7 +263,6 @@ export default {
257
263
  provide('_loadingInstance', toRef(props, 'loadingInstance'))
258
264
  provide('_getNativeComps', props.getNativeComps)
259
265
  provide('pageConfig', pageConfigRef)
260
- const dynamicMapComp = reactive({})
261
266
  provide('_axiosInstance', axiosInstance)
262
267
  provide('dynamicMapComp', dynamicMapComp)
263
268
  provide('_mapComp', mapCompRef)