resolver-egretimp-plus 0.1.123 → 0.1.124
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/dist/h5/index.js +1 -1
- package/dist/web/index.js +1 -1
- package/package.json +1 -1
- package/src/components/packages-web/CustomComponentCycleTabPane.vue +10 -0
- package/src/components/packages-web/CustomComponentNativeTabPane.vue +10 -0
- package/src/components/packages-web/CustomComponentTabs.vue +13 -0
- package/src/utils/render.jsx +6 -6
package/package.json
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
<ElRow>
|
|
22
22
|
<Renderer
|
|
23
|
+
v-if="isLoaded($index)"
|
|
23
24
|
:mode="generateModel({
|
|
24
25
|
data: modelValue?.[$index],
|
|
25
26
|
index: $index,
|
|
@@ -128,6 +129,15 @@ if (!OPEN_DATA_RULES) {
|
|
|
128
129
|
})
|
|
129
130
|
}
|
|
130
131
|
|
|
132
|
+
const isLoaded = computed(() => {
|
|
133
|
+
return (index) => {
|
|
134
|
+
if (OPEN_DATA_RULES) {
|
|
135
|
+
return props?.config?.parent?._loadedNames?.includes(`${props.config?.metaCode}-${index}`)
|
|
136
|
+
}
|
|
137
|
+
return true
|
|
138
|
+
}
|
|
139
|
+
})
|
|
140
|
+
|
|
131
141
|
// 自定义渲染label方法
|
|
132
142
|
const labelRenderContentFn = computed(() => {
|
|
133
143
|
if (props.config?.labelRender && typeof props.config?.labelRender == 'function') {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
</template>
|
|
7
7
|
<ElRow>
|
|
8
8
|
<Renderer
|
|
9
|
+
v-if="isLoaded"
|
|
9
10
|
:mode="generateModel({
|
|
10
11
|
data: props.refValue.value,
|
|
11
12
|
index: 0,
|
|
@@ -27,6 +28,7 @@ import { computed, inject, useAttrs, useSlots } from 'vue'
|
|
|
27
28
|
import { commonPropsType } from '../../utils/index.js'
|
|
28
29
|
import { TabPane } from '../tabs'
|
|
29
30
|
import { h } from 'vue'
|
|
31
|
+
import { OPEN_DATA_RULES } from '../../config.js'
|
|
30
32
|
|
|
31
33
|
const slots = useSlots()
|
|
32
34
|
const props = defineProps({
|
|
@@ -64,6 +66,13 @@ const tabPaneProps = computed(() => {
|
|
|
64
66
|
return ret
|
|
65
67
|
})
|
|
66
68
|
|
|
69
|
+
const isLoaded = computed(() => {
|
|
70
|
+
if (OPEN_DATA_RULES) {
|
|
71
|
+
return props?.config?.parent?._loadedNames?.includes(props.config?.metaCode)
|
|
72
|
+
}
|
|
73
|
+
return true
|
|
74
|
+
})
|
|
75
|
+
|
|
67
76
|
// 自定义渲染label方法
|
|
68
77
|
const labelRenderContent = computed(() => {
|
|
69
78
|
const context = props.config?.labelRender?.(getLableRenderParams())
|
|
@@ -73,6 +82,7 @@ const labelRenderContent = computed(() => {
|
|
|
73
82
|
return context
|
|
74
83
|
}
|
|
75
84
|
})
|
|
85
|
+
|
|
76
86
|
function getLableRenderParams() {
|
|
77
87
|
return {
|
|
78
88
|
config: props.config,
|
|
@@ -12,6 +12,8 @@ import Tabs from '../tabs'
|
|
|
12
12
|
import Renderer from '../../renderer.jsx'
|
|
13
13
|
import { computed, useAttrs, useSlots } from 'vue'
|
|
14
14
|
import { commonPropsType, hasOwn } from '../../utils/index.js'
|
|
15
|
+
import { watch } from 'vue'
|
|
16
|
+
import { OPEN_DATA_RULES } from '../../config.js'
|
|
15
17
|
|
|
16
18
|
// import * as lib from 'element-plus/es/utils/index.mjs'
|
|
17
19
|
|
|
@@ -114,6 +116,17 @@ const tabsClass = computed(() => {
|
|
|
114
116
|
}
|
|
115
117
|
})
|
|
116
118
|
|
|
119
|
+
if (OPEN_DATA_RULES) {
|
|
120
|
+
watch(activeNames, (val) => {
|
|
121
|
+
!props.config._loadedNames && (props.config._loadedNames = [])
|
|
122
|
+
if (!props.config._loadedNames.some(name => name === val)) {
|
|
123
|
+
props.config._loadedNames.push(val)
|
|
124
|
+
}
|
|
125
|
+
}, {
|
|
126
|
+
immediate: true
|
|
127
|
+
})
|
|
128
|
+
}
|
|
129
|
+
|
|
117
130
|
function assertMetaType(config, metaType) {
|
|
118
131
|
return config.renderby === metaType || config.metaType === metaType
|
|
119
132
|
}
|
package/src/utils/render.jsx
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCodeMapRules } from '../rules/rulesDriver.js'
|
|
2
2
|
import SimpleFormItemPc from '../components/simpleFormItemPc'
|
|
3
3
|
import { resolveAssetComponents, findComponent, compareComponet, normalPixel, isPlainObject, hasOwn, isFnStr, normalCapitalizeComponent, capitalize, camelize, formatDate, definePrivatelyProp, extend, getPathVal, cloneDeep, generateUniqueId} from './common.js'
|
|
4
|
-
import { resolveComponent, inject, watch, unref, markRaw, reactive } from 'vue'
|
|
4
|
+
import { resolveComponent, inject, watch, unref, markRaw, reactive, h, toRaw } from 'vue'
|
|
5
5
|
import CustomComponentColH5 from '../components/packages-H5/CustomComponentColH5.vue'
|
|
6
6
|
import {
|
|
7
7
|
commonPropsType,
|
|
@@ -36,7 +36,6 @@ import infoIcon from '../components/icons/info.vue'
|
|
|
36
36
|
import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../components/helper/eventOrchestration.js'
|
|
37
37
|
import CmiFormItem from '../components/cmiFormItem'
|
|
38
38
|
import loadModule from './loadModule.js'
|
|
39
|
-
import { h } from 'vue'
|
|
40
39
|
import dayjs from 'dayjs'
|
|
41
40
|
import { OPEN_DATA_RULES } from '../config.js'
|
|
42
41
|
import { useVmodels } from '../hooks/reactive.js'
|
|
@@ -253,8 +252,9 @@ export function normalConfig({
|
|
|
253
252
|
hireRelat,
|
|
254
253
|
parent: null, // 这个是执行过程中,动态获取的
|
|
255
254
|
}
|
|
256
|
-
|
|
257
|
-
|
|
255
|
+
if (!OPEN_DATA_RULES) {
|
|
256
|
+
extendNativeObj.dynamicHireRelat = ''
|
|
257
|
+
} else {
|
|
258
258
|
if (changeConfig) {
|
|
259
259
|
// 设置multiPmPageMetaList的时候,如果数组变了,如果数组中的值变换了位置,需要对dynamicMapComp设置正确的映射
|
|
260
260
|
correctConfigDynamicMap(dynamicMapComp, dynamicHireRelat)
|
|
@@ -324,7 +324,7 @@ export function normalConfig({
|
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
mapComp[hireRelat] = pageConfig
|
|
327
|
-
parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue, parentDynamicMapComp }, pageConfig)
|
|
327
|
+
parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue, parentDynamicMapComp }, toRaw(pageConfig))
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
if (!OPEN_DATA_RULES) {
|
|
@@ -423,7 +423,7 @@ export function normalConfig({
|
|
|
423
423
|
return retColumnConfigs
|
|
424
424
|
}
|
|
425
425
|
})
|
|
426
|
-
config.multiPmPageMetaList =
|
|
426
|
+
config.multiPmPageMetaList = pageMetaList
|
|
427
427
|
cbFns.forEach(cb => cb())
|
|
428
428
|
|
|
429
429
|
const mapKeys = config._rowColumnConfgsMap.keys()
|