resolver-egretimp-plus 0.0.83 → 0.0.85

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.83",
3
+ "version": "0.0.85",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -191,6 +191,7 @@ export default {
191
191
  }
192
192
  function executeClickEvents() {
193
193
  executeEventOrchestration({
194
+ components,
194
195
  props,
195
196
  requestTraceId: requestTraceId?.value,
196
197
  axiosInstance: _axiosInstance?.value,
@@ -6,6 +6,11 @@ import en from 'element-plus/es/locale/lang/en'
6
6
  const Resolver = defineAsyncComponent(() => import('../../../resolver-web.vue'))
7
7
 
8
8
  const props = defineProps({
9
+ // 传入的自定义组件
10
+ components: {
11
+ type: Object,
12
+ default: () => ({})
13
+ },
9
14
  busiIdentityId: {
10
15
  type: String,
11
16
  default: ''
@@ -119,6 +124,7 @@ defineExpose({
119
124
  :polyfillConfigs="props.polyfillConfigs"
120
125
  :axiosInstance="props.axiosInstance"
121
126
  :axiosConfig="props.axiosConfig"
127
+ :components="props.components"
122
128
  ></Resolver>
123
129
  </ElDialog>
124
130
  </ElConfigProvider>
@@ -181,6 +181,7 @@ export function getTableConfig(outParamMappingList = [], { dynamicMapComp, dynam
181
181
  }
182
182
 
183
183
  export function openDailg({
184
+ components,
184
185
  rootValue,
185
186
  polyfillConfigs,
186
187
  pagePopupMap,
@@ -354,6 +355,7 @@ export function openDailg({
354
355
  lang,
355
356
  loadEvnetsReq: reqData,
356
357
  initData: reqData,
358
+ components,
357
359
  polyfillConfigs: {
358
360
  ...initPolyfillConfigs,
359
361
  ...(polyfillConfigs || {})
@@ -451,7 +453,7 @@ function closePage(lcpPageClosedMapVO) {
451
453
  }
452
454
  }
453
455
 
454
- export async function executeEventOrchestration({props, requestTraceId, axiosInstance, polyfillConfigs, buttonActions, rootValue, confirmInstance, dialogReq, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
456
+ export async function executeEventOrchestration({components, props, requestTraceId, axiosInstance, polyfillConfigs, buttonActions, rootValue, confirmInstance, dialogReq, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
455
457
  const lcpPageRuleVOLis = props.config?.lcpPageRuleVOList || []
456
458
  const PageServiceMapVOList = props.config.lcpPageServiceMapVOList || []
457
459
  const mixinServiceConfig = PageServiceMapVOList.find(service => service.serviceType === '1')
@@ -498,6 +500,7 @@ export async function executeEventOrchestration({props, requestTraceId, axiosIns
498
500
 
499
501
  const dynamicHireRelat = props.config?.dynamicHireRelat
500
502
  openDailg({
503
+ components,
501
504
  rootValue,
502
505
  polyfillConfigs,
503
506
  pagePopupMap: lcpPagePopupMapVO,
@@ -66,7 +66,11 @@ export default {
66
66
  const tableColumnConfigs = computed(() => {
67
67
  let pmPageMetaList = props.config.pmPageMetaList || []
68
68
  return pmPageMetaList.map((config) => {
69
- if (config.displayType === DISPLAY_SHOW && !tableColumnFirstMetaCode.value) {
69
+ if (
70
+ config.displayType !== DISPLAY_HIDDEN &&
71
+ !((props.width == 0 || props.width == '0px' || config.hidden == '1')) &&
72
+ !tableColumnFirstMetaCode.value
73
+ ) {
70
74
  tableColumnFirstMetaCode.value = config.metaCode
71
75
  }
72
76
  return normalColumnConfig(config)
@@ -216,9 +220,6 @@ export default {
216
220
  watch(() => {
217
221
  return tableData?.value?.length
218
222
  }, (length) => {
219
- // if (props.config.metaCode == 'solutionSupports') {
220
- // debugger
221
- // }
222
223
  let list = []
223
224
  if (length) {
224
225
  const newVal = tableData?.value
@@ -251,7 +252,7 @@ export default {
251
252
  props.config.multiPmPageMetaList = list
252
253
  }, {
253
254
  immediate: true,
254
- // deep: true,
255
+ deep: true,
255
256
  })
256
257
  // 统计行定义 ====start======
257
258
  const totalMetaCodes = computed(() => {
@@ -468,8 +469,13 @@ export default {
468
469
  }
469
470
  const config = multiPmPageMetaList.value?.[$index]?.[configIdx]
470
471
  return (
471
- tableColumnNotRender(config) ? null :
472
- <Renderer key={`${config.columnId}-${config.rowIndex}`} class="error-tip-block" modelValue={getValue($index)} rowScope={{row, $index}} onUpdate:modelValue={(val) => { onUpdateModelValue(val, $index) }} config={config}></Renderer>
472
+ <div>
473
+ requiredFlag: {config.requiredFlag}
474
+ {
475
+ tableColumnNotRender(config) ? null :
476
+ <Renderer key={`${config.columnId}-${config.rowIndex}`} class="error-tip-block" modelValue={getValue($index)} rowScope={{row, $index}} onUpdate:modelValue={(val) => { onUpdateModelValue(val, $index) }} config={config}></Renderer>
477
+ }
478
+ </div>
473
479
  )
474
480
  }
475
481
  }}
@@ -11,6 +11,8 @@ export function usePageConfig() {
11
11
  const hireRelatMapRulesRef = ref(null)
12
12
  const mapCompRef = ref(null)
13
13
  function initPageConfig({
14
+ route,
15
+ router,
14
16
  config,
15
17
  lang,
16
18
  polyfillConfigs,
@@ -23,6 +25,8 @@ export function usePageConfig() {
23
25
  messageCb
24
26
  }) {
25
27
  const { pageConfig, mapComp, hireRelatMapRules } = parsePageConfig({
28
+ route,
29
+ router,
26
30
  config, lang, polyfillConfigs, instance, isH5,
27
31
  rootValue,
28
32
  parentRootValue,
package/src/index.jsx CHANGED
@@ -7,6 +7,8 @@ import { MODE } from "./utils/const.js"
7
7
  import { generateRequester } from "./utils/request.js"
8
8
  import { executeLoadServices } from "./components/helper/resolver.js"
9
9
  import { deepMerge } from "./utils/index.js"
10
+ import { useRouter } from "vue-router"
11
+ import { useRoute } from "vue-router"
10
12
  export default {
11
13
  name: 'Resolver',
12
14
  props: {
@@ -130,6 +132,8 @@ export default {
130
132
  setup(props, { emit, attrs, expose }) {
131
133
  const rootStore = reactive({})
132
134
  const nativeDataLoad = ref(false)
135
+ const router = useRouter()
136
+ const route = useRoute()
133
137
  const axiosInstance = ref(props.axiosInstance)
134
138
  watch(() => {
135
139
  return props.axiosConfig
@@ -153,6 +157,8 @@ export default {
153
157
  const { initPageConfig, pageConfigRef, mapCompRef, hireRelatMapRulesRef } = usePageConfig()
154
158
 
155
159
  initPageConfig({
160
+ router,
161
+ route,
156
162
  config: props.config,
157
163
  lang: props.lang,
158
164
  polyfillConfigs: props.polyfillConfigs,
@@ -183,6 +189,8 @@ export default {
183
189
 
184
190
  watch(toRef(props, 'config'), () => {
185
191
  initPageConfig({
192
+ router,
193
+ route,
186
194
  config: props.config,
187
195
  lang: props.lang,
188
196
  polyfillConfigs: props.polyfillConfigs,
@@ -189,7 +189,9 @@ const allInitEvents = {
189
189
  // const oldDisplayType = labelInfo && labelInfo.displayType
190
190
  // oldDisplayTypes.push(oldDisplayType)
191
191
  labelInfo && (labelInfo.displayType = '0')
192
+ labelInfo && (labelInfo.hidden = '1')
192
193
  labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '0')
194
+ labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '1')
193
195
  })
194
196
  }, 0)
195
197
 
@@ -198,7 +200,9 @@ const allInitEvents = {
198
200
  configs.forEach((labelInfo, idx) => {
199
201
  // const oldDisplayType = oldDisplayTypes[idx]
200
202
  labelInfo && (labelInfo.displayType = '1')
203
+ labelInfo && (labelInfo.hidden = '0')
201
204
  labelInfo && labelInfo.refConfig && (labelInfo.refConfig.displayType = '1')
205
+ labelInfo && labelInfo.refConfig && (labelInfo.refConfig.hidden = '0')
202
206
  })
203
207
  }
204
208
  },
@@ -105,6 +105,8 @@ function generateFormConfig(lang = 'zh', isH5) {
105
105
  * @param {*} config 通过接口获取的配置对象
106
106
  */
107
107
  export function parsePageConfig({
108
+ route,
109
+ router,
108
110
  config, lang, polyfillConfigs, instance, isH5,
109
111
  rootValue,
110
112
  parentRootValue,
@@ -118,6 +120,8 @@ export function parsePageConfig({
118
120
  formConfig.pmPageMetaList = config.pmPageMetaList
119
121
  const cbs = []
120
122
  let { pageConfig, mapComp } = normalConfig({
123
+ route,
124
+ router,
121
125
  polyfillConfigs,
122
126
  instance,
123
127
  cbs,
@@ -144,6 +148,8 @@ export function parsePageConfig({
144
148
  * @param {*} config
145
149
  */
146
150
  export function normalConfig({
151
+ route,
152
+ router,
147
153
  polyfillConfigs,
148
154
  instance,
149
155
  cbs = [],
@@ -168,6 +174,8 @@ export function normalConfig({
168
174
  wrapVm: null, // 当前组件的实例(也就是analysisComponent)
169
175
  hireRelat,
170
176
  parent: null, // 这个是执行过程中,动态获取的
177
+ router,
178
+ route,
171
179
  dynamicHireRelat: '', // 这个也是执行过程中,动态获取的层级
172
180
  }
173
181
 
@@ -187,6 +195,8 @@ export function normalConfig({
187
195
  if (config.pmPageMetaList && config.pmPageMetaList.length) {
188
196
  config.pmPageMetaList = config.pmPageMetaList.map(metaItem => {
189
197
  const { pageConfig } = normalConfig({
198
+ route,
199
+ router,
190
200
  cbs,
191
201
  polyfillConfigs,
192
202
  instance,
@@ -813,7 +823,7 @@ export function getComponentPropsKeys(comp, config) {
813
823
  let emitsKyes = []
814
824
  if (config) {
815
825
  Object.keys(config).forEach(key => {
816
- if (/^on[A-Z]/.test(key)) {
826
+ if (/^on[A-Z]/.test(key) && !['onVnodeMounted'].includes(key)) {
817
827
  emitsKyes.push(key)
818
828
  }
819
829
  })