resolver-egretimp-plus 0.0.31 → 0.0.33

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.
@@ -39,7 +39,7 @@ export function usePageConfig() {
39
39
 
40
40
  export function useBuildInData(messageTipInstance, loadingInstance) {
41
41
  const pageConfig = ref(null)
42
- function getPageConfig(reqData) {
42
+ function getPageConfig(reqData, cb) {
43
43
  if (loadingInstance.start && typeof loadingInstance.start === 'function') {
44
44
  loadingInstance.start()
45
45
  } else if (loadingInstance.show && typeof loadingInstance.show === 'function') {
@@ -47,8 +47,9 @@ export function useBuildInData(messageTipInstance, loadingInstance) {
47
47
  }
48
48
  buildInRequest(QUERY_PAGE_CONFIG_DATA, reqData).then(ret => {
49
49
  if (ret.data.success) {
50
- pageConfig.value = normalPageConfigs(mock)
51
- // pageConfig.value = normalPageConfigs(ret.data.result)
50
+ // pageConfig.value = normalPageConfigs(mock)
51
+ pageConfig.value = normalPageConfigs(ret.data.result)
52
+ cb(pageConfig.value)
52
53
  getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId)
53
54
  return
54
55
  }
package/src/index.jsx CHANGED
@@ -88,8 +88,9 @@ export default {
88
88
  }
89
89
  },
90
90
  setup(props, { emit, attrs, expose }) {
91
- let nativeDataLoad = ref(false)
92
- let axiosInstance = ref(props.axiosInstance)
91
+ const rootStore = reactive({})
92
+ const nativeDataLoad = ref(false)
93
+ const axiosInstance = ref(props.axiosInstance)
93
94
  watch(() => {
94
95
  return props.axiosConfig
95
96
  }, (val) => {
@@ -101,8 +102,10 @@ export default {
101
102
  }, {
102
103
  immediate: true
103
104
  })
105
+ watch(rootStore, () => {
106
+ emit('rootStoreChange', rootStore)
107
+ }, { immediate: true })
104
108
 
105
-
106
109
  const dataLoad = computed(() => {
107
110
  return props.dataLoad || nativeDataLoad.value
108
111
  })
@@ -152,7 +155,6 @@ export default {
152
155
  axiosInstance,
153
156
  reqData: props.loadEvnetsReq,
154
157
  respCb: (result) => {
155
- debugger
156
158
  nativeDataLoad.value = true
157
159
  emit('update:modelValue', result)
158
160
  emit('loadEvnetsCompleted', result)
@@ -161,6 +163,7 @@ export default {
161
163
  )
162
164
  })
163
165
 
166
+ provide('_rootStore', rootStore)
164
167
  provide('_messageInstance', toRef(props, 'messageInstance'))
165
168
  provide('_loadingInstance', toRef(props, 'loadingInstance'))
166
169
  provide('_getNativeComps', props.getNativeComps)
@@ -32,6 +32,9 @@ getPageConfig({
32
32
  busiIdentityId: props.busiIdentityId,
33
33
  queryPageMeta: '1',
34
34
  queryPageService: '1',
35
+ }, (pageConfig) => {
36
+ // 数据加载完成事件 'loadedConfigCompeted'
37
+ attrs.onLoadedConfigCompeted(pageConfig)
35
38
  })
36
39
  const allSelects = computed(() => {
37
40
  return {
@@ -1,6 +1,6 @@
1
1
 
2
2
  .el-tabs {
3
- display: block;
3
+ // display: block;
4
4
  border-radius: 4px;
5
5
  overflow: hidden;
6
6
  &.el-tabs--border-card>.el-tabs__content {
@@ -213,21 +213,20 @@ export function normalConfig({
213
213
  const tabsServices = getTableServices(pageConfig.lcpPageServiceMapVOList, {dynamicMapComp: mapComp, dynamicMapCompKeys: Object.keys(mapComp), hireRelat})
214
214
  tabsServices.forEach((({tableConfig, service}) => {
215
215
  tableConfig.currentChange = (val, props, page) => {
216
- setTimeout(() => {
217
- debugger
216
+ // setTimeout(() => {
218
217
  const dynamicMapComp = props.config.dynamicMapComp
219
218
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
220
219
  const dynamicHireRelat = props.config.dynamicHireRelat
221
220
  dispatchClickEvent(service, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, rootValue, axiosInstance, messageInstance })
222
- }, 0);
221
+ // }, 0);
223
222
  }
224
223
  tableConfig.sizeChange = (val, props, page) => {
225
- setTimeout(() => {
224
+ // setTimeout(() => {
226
225
  const dynamicMapComp = props.config.dynamicMapComp
227
226
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
228
227
  const dynamicHireRelat = props.config.dynamicHireRelat
229
228
  dispatchClickEvent(service, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, rootValue, axiosInstance, messageInstance })
230
- }, 0);
229
+ // }, 0);
231
230
  }
232
231
  }))
233
232
  })