resolver-egretimp-plus 0.0.63 → 0.0.65

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.
@@ -52,8 +52,8 @@ export function useBuildInData(messageTipInstance, loadingInstance) {
52
52
  }
53
53
  buildInRequest(QUERY_PAGE_CONFIG_DATA, reqData).then(ret => {
54
54
  if (resultToast(ret.data, messageTipInstance, { noSuccessIip: true })) {
55
- // pageConfig.value = normalPageConfigs(mock)
56
- pageConfig.value = normalPageConfigs(ret.data.result)
55
+ pageConfig.value = normalPageConfigs(mock)
56
+ // pageConfig.value = normalPageConfigs(ret.data.result)
57
57
  cb(pageConfig.value)
58
58
  getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId)
59
59
  return
File without changes
@@ -0,0 +1,48 @@
1
+ import * as Vue from 'vue'
2
+ import { loadModule } from 'vue3-sfc-loader'
3
+
4
+ const options = {
5
+ moduleCache: {
6
+ vue: Vue,
7
+ },
8
+
9
+ async getFile(url) {
10
+ const res = await fetch(url);
11
+ if ( !res.ok )
12
+ throw Object.assign(new Error(url+' '+res.statusText), { res });
13
+ return await res.text();
14
+ },
15
+
16
+ addStyle(textContent) {
17
+ const style = Object.assign(document.createElement('style'), { textContent });
18
+ const ref = document.head.getElementsByTagName('style')[0] || null;
19
+ document.head.insertBefore(style, ref);
20
+ },
21
+ log(type, ...args) {
22
+ console[type](...args);
23
+ },
24
+ compiledCache: {
25
+ set(key, str) {
26
+ for (;;) {
27
+ try {
28
+ window.localStorage.setItem(key, str);
29
+ break;
30
+ } catch(ex) {
31
+ window.localStorage.removeItem(window.localStorage.key(0));
32
+ }
33
+ }
34
+ },
35
+ get(key) {
36
+ return window.localStorage.getItem(key) ?? undefined;
37
+ },
38
+ },
39
+
40
+ handleModule(type, source, path, options) {
41
+ if ( type === '.json' )
42
+ return JSON.parse(source);
43
+ }
44
+ }
45
+
46
+ export default function(url) {
47
+ return loadModule(url, options)
48
+ }
@@ -28,6 +28,7 @@ import CustomComponentPlain from '../components/packages-web/CustomComponentPlai
28
28
  import QuestionFilled from '../components/icons/question-filled.vue'
29
29
  import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../components/helper/eventOrchestration.js'
30
30
  import CmiFormItem from '../components/cmiFormItem'
31
+ import loadModule from './loadModule.js'
31
32
 
32
33
  // 解析配置中的defStyle属性
33
34
  export function parseDefStyle(defStyle) {
@@ -222,16 +223,20 @@ export function normalConfig({
222
223
  cbs.push(() => {
223
224
  const tabsServices = getTableServices(pageConfig.lcpPageServiceMapVOList, {dynamicMapComp: mapComp, dynamicMapCompKeys: Object.keys(mapComp), hireRelat})
224
225
  tabsServices.forEach((({tableConfig, service}) => {
226
+ const orginCurrentChange = tableConfig.currentChange
225
227
  tableConfig.currentChange = (val, props, page) => {
226
228
  // setTimeout(() => {
229
+ orginCurrentChange && orginCurrentChange(val, props, page)
227
230
  const dynamicMapComp = props.config.dynamicMapComp
228
231
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
229
232
  const dynamicHireRelat = props.config.dynamicHireRelat
230
233
  dispatchClickEvent(service, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, rootValue, messageCb, compConfig: pageConfig, axiosInstance, messageInstance })
231
234
  // }, 0);
232
235
  }
236
+ const orginSizeChange = tableConfig.sizeChange
233
237
  tableConfig.sizeChange = (val, props, page) => {
234
238
  // setTimeout(() => {
239
+ orginSizeChange && orginSizeChange(val, props, page)
235
240
  const dynamicMapComp = props.config.dynamicMapComp
236
241
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
237
242
  const dynamicHireRelat = props.config.dynamicHireRelat
@@ -324,6 +329,9 @@ export function isPlainColumn(config, disabled) {
324
329
  }
325
330
 
326
331
  export function getComponentForConfig({config, disabled, getNativeComps}) {
332
+ if (config.isCustomComp) {
333
+ return () => loadModule(config.url)
334
+ }
327
335
  // 表格中中的列,是否需要转换为普通形式
328
336
  if (isPlainColumn(config, disabled)) {
329
337
  return CustomComponentPlain
@@ -392,6 +400,9 @@ export function getRenderComponentProps({ props, component, modelValue, selects,
392
400
  ...defprops,
393
401
  ...commonProps
394
402
  }
403
+ if (config.class) {
404
+ retObj.class = config.class
405
+ }
395
406
  return retObj
396
407
  }
397
408
  // 一些组件并且没有占居满格