resolver-egretimp-plus 0.0.151 → 0.0.153
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/const/index.js +1 -1
- package/dist/h5/index.js +18 -18
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/text.scss +1 -1
- package/dist/web/index.js +2 -2
- package/index-H5.js +15 -0
- package/index-web.js +7 -1
- package/package.json +4 -4
- package/src/analysisComponent.jsx +6 -2
- package/src/api/builtIn.js +2 -1
- package/src/components/icons/loading.vue +13 -0
- package/src/components/loadingComponent/LoadingComponent.vue +33 -0
- package/src/components/packages-web/CustomComponentTabPane.vue +7 -2
- package/src/components/packages-web/ElText.vue +4 -1
- package/src/components/tabs/src/tab-nav.jsx +2 -0
- package/src/components/tabs/src/tab-pane.js +1 -0
- package/src/enums/index.js +7 -4
- package/src/index.jsx +7 -1
- package/src/renderer.jsx +2 -1
- package/src/resolver-common.vue +1 -1
- package/src/rules/eventsSupplement.js +17 -17
- package/src/rulesImp/events.js +17 -17
- package/src/theme/element/components/text.scss +1 -1
- package/src/utils/const.js +5 -0
- package/src/utils/loadModule.js +21 -6
- package/src/utils/render.jsx +23 -4
package/index-H5.js
CHANGED
|
@@ -1,2 +1,17 @@
|
|
|
1
1
|
export * from './index.js'
|
|
2
2
|
export { default as default} from './src/resolver-H5.vue'
|
|
3
|
+
import * as all from './index.js'
|
|
4
|
+
import * as resolverAll from './src/resolver-H5.vue'
|
|
5
|
+
|
|
6
|
+
if (window) {
|
|
7
|
+
const obj = {
|
|
8
|
+
...all,
|
|
9
|
+
...resolverAll
|
|
10
|
+
}
|
|
11
|
+
Object.keys(obj).forEach(key => {
|
|
12
|
+
!window['resolver-egretimp-plus'] && (window['resolver-egretimp-plus'] = {})
|
|
13
|
+
if (!Object.prototype.hasOwnProperty.call(window['resolver-egretimp-plus'], key)) {
|
|
14
|
+
window['resolver-egretimp-plus'][key] = obj[key]
|
|
15
|
+
}
|
|
16
|
+
})
|
|
17
|
+
}
|
package/index-web.js
CHANGED
|
@@ -4,8 +4,14 @@ import * as all from './index.js'
|
|
|
4
4
|
import * as resolverAll from './src/resolver-web.vue'
|
|
5
5
|
|
|
6
6
|
if (window) {
|
|
7
|
-
|
|
7
|
+
const obj = {
|
|
8
8
|
...all,
|
|
9
9
|
...resolverAll
|
|
10
10
|
}
|
|
11
|
+
Object.keys(obj).forEach(key => {
|
|
12
|
+
!window['resolver-egretimp-plus'] && (window['resolver-egretimp-plus'] = {})
|
|
13
|
+
if (!Object.prototype.hasOwnProperty.call(window['resolver-egretimp-plus'], key)) {
|
|
14
|
+
window['resolver-egretimp-plus'][key] = obj[key]
|
|
15
|
+
}
|
|
16
|
+
})
|
|
11
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "resolver-egretimp-plus",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.153",
|
|
4
4
|
"description": "交付体验渲染",
|
|
5
5
|
"main": "./dist/web/index.js",
|
|
6
6
|
"module": "./dist/web/index.js",
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
"@vueuse/core": "9.1.0",
|
|
27
27
|
"axios": "^1.7.7",
|
|
28
28
|
"babel-loader": "^9.1.3",
|
|
29
|
+
"chalk": "^5.4.1",
|
|
29
30
|
"consola": "^3.2.3",
|
|
30
31
|
"core-js-pure": "^3.38.1",
|
|
31
32
|
"crypto-js": "^4.2.0",
|
|
@@ -37,6 +38,7 @@
|
|
|
37
38
|
"gulp-clean-css": "^4.3.0",
|
|
38
39
|
"gulp-rename": "^2.0.0",
|
|
39
40
|
"gulp-sass": "^5.1.0",
|
|
41
|
+
"json-rules-engine": "^7.2.1",
|
|
40
42
|
"less-loader": "^12.2.0",
|
|
41
43
|
"lodash-es": "^4.17.21",
|
|
42
44
|
"mini-css-extract-plugin": "^2.9.0",
|
|
@@ -51,8 +53,6 @@
|
|
|
51
53
|
"vue3-quill": "^0.3.1",
|
|
52
54
|
"vue3-sfc-loader": "^0.9.5",
|
|
53
55
|
"webpack": "^5.90.0",
|
|
54
|
-
"json-rules-engine": "^7.2.1",
|
|
55
56
|
"webpack-cli": "^5.1.4"
|
|
56
|
-
}
|
|
57
|
-
"dependencies": {}
|
|
57
|
+
}
|
|
58
58
|
}
|
|
@@ -8,6 +8,7 @@ import { useRoute } from 'vue-router'
|
|
|
8
8
|
import { executeEventOrchestration } from './components/helper/eventOrchestration.js'
|
|
9
9
|
import { useRouter } from 'vue-router'
|
|
10
10
|
import { onErrorCaptured } from 'vue'
|
|
11
|
+
import LoadingComponent from './components/loadingComponent/LoadingComponent.vue'
|
|
11
12
|
|
|
12
13
|
export default {
|
|
13
14
|
name: 'AnalysisComponent',
|
|
@@ -164,7 +165,7 @@ export default {
|
|
|
164
165
|
if (res?.default?.emits) {
|
|
165
166
|
initVmodels(res?.default?.emits)
|
|
166
167
|
}
|
|
167
|
-
fnComponentkeys.value = getComponentPropsKeys(res?.default)
|
|
168
|
+
fnComponentkeys.value = getComponentPropsKeys(res?.default || res)
|
|
168
169
|
// const obj = {}
|
|
169
170
|
// const propsKeys = getComponentPropsKeys(res?.default)
|
|
170
171
|
// propsKeys.forEach(key => {
|
|
@@ -182,7 +183,10 @@ export default {
|
|
|
182
183
|
// 获取组件中定义的props,赋值对应的属性===end===
|
|
183
184
|
const currentComponent = computed(() => {
|
|
184
185
|
if (typeof props.component === 'function') {
|
|
185
|
-
return defineAsyncComponent(
|
|
186
|
+
return defineAsyncComponent({
|
|
187
|
+
loader: props.component,
|
|
188
|
+
loadingComponent: LoadingComponent,
|
|
189
|
+
})
|
|
186
190
|
} else {
|
|
187
191
|
return props.component
|
|
188
192
|
}
|
package/src/api/builtIn.js
CHANGED
|
@@ -2,4 +2,5 @@ export const QUERY_PAGE_CONFIG_DATA = '/sa-lcp/api/v1/pageConfig/queryPageConfig
|
|
|
2
2
|
export const LCP_LOGIN = '/sa-lcp/login'
|
|
3
3
|
export const GET_SYS_PARAM_CACHE = '/sa-lcp/api/v1/sysparam/getSysParamCache'
|
|
4
4
|
export const REFRESH_TOKEN = '/sa-lcp/changePwd/refreshToken'
|
|
5
|
-
export const DATA_VALID_RULE_EXECUTE = '/sa-lcp/api/v1/validate/dataValidRuleExecute'
|
|
5
|
+
export const DATA_VALID_RULE_EXECUTE = '/sa-lcp/api/v1/validate/dataValidRuleExecute'
|
|
6
|
+
export const FIND_FILEA_NND_CONENT_BY_ID = '/sa-lcp/api/v1/fileopertate/findFileAndContentById'
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
3
|
+
<path
|
|
4
|
+
fill="currentColor"
|
|
5
|
+
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
|
|
6
|
+
/>
|
|
7
|
+
</svg>
|
|
8
|
+
</template>
|
|
9
|
+
<script setup>
|
|
10
|
+
defineOptions({
|
|
11
|
+
name: 'Loading',
|
|
12
|
+
})
|
|
13
|
+
</script>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import Loading from '../icons/loading.vue'
|
|
3
|
+
</script>
|
|
4
|
+
<template>
|
|
5
|
+
<i class="loading-icon">
|
|
6
|
+
<Loading></Loading>
|
|
7
|
+
</i>
|
|
8
|
+
</template>
|
|
9
|
+
<style lang="scss" scoped>
|
|
10
|
+
.loading-icon {
|
|
11
|
+
--color: inherit;
|
|
12
|
+
height: 1em;
|
|
13
|
+
width: 1em;
|
|
14
|
+
line-height: 1em;
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
position: relative;
|
|
19
|
+
fill: currentColor;
|
|
20
|
+
color: var(--color);
|
|
21
|
+
// font-size: inherit;
|
|
22
|
+
|
|
23
|
+
font-size: 18px;
|
|
24
|
+
color: #606266;
|
|
25
|
+
margin: 0 auto;
|
|
26
|
+
animation: loading-rotate 2s linear infinite;
|
|
27
|
+
}
|
|
28
|
+
@keyframes loading-rotate {
|
|
29
|
+
100% {
|
|
30
|
+
transform: rotate(360deg);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -17,7 +17,8 @@ import { TabPane } from '../tabs'
|
|
|
17
17
|
|
|
18
18
|
const props = defineProps({
|
|
19
19
|
...commonPropsType,
|
|
20
|
-
...
|
|
20
|
+
...TabPane.props,
|
|
21
|
+
hidden: [String, Boolean]
|
|
21
22
|
})
|
|
22
23
|
const attrs = useAttrs()
|
|
23
24
|
|
|
@@ -33,9 +34,13 @@ const polyProps = computed(() => {
|
|
|
33
34
|
}
|
|
34
35
|
})
|
|
35
36
|
const tabPaneProps = computed(() => {
|
|
36
|
-
|
|
37
|
+
const ret = Object.keys(TabPane.props).reduce((ret, key) => {
|
|
37
38
|
ret[key] = props[key]
|
|
38
39
|
return ret
|
|
39
40
|
}, {})
|
|
41
|
+
if (typeof ret.hidden !== 'boolean') {
|
|
42
|
+
ret.hidden = ret.hidden == '1'
|
|
43
|
+
}
|
|
44
|
+
return ret
|
|
40
45
|
})
|
|
41
46
|
</script>
|
|
@@ -7,18 +7,21 @@
|
|
|
7
7
|
import { ElText } from 'element-plus'
|
|
8
8
|
import { computed, defineProps, inject, getCurrentInstance, useAttrs } from 'vue'
|
|
9
9
|
import { commonPropsType } from '../../utils/index.js'
|
|
10
|
+
|
|
10
11
|
const appContext = getCurrentInstance()?.appContext
|
|
11
12
|
const props = defineProps({
|
|
12
13
|
...commonPropsType,
|
|
13
14
|
...ElText.props,
|
|
15
|
+
fontSize: [String, Number]
|
|
14
16
|
})
|
|
15
17
|
const attrs = useAttrs()
|
|
16
18
|
|
|
17
19
|
const elRowProps = computed(() => {
|
|
18
|
-
|
|
20
|
+
const result = Object.keys(ElText.props).reduce((ret, key) => {
|
|
19
21
|
ret[key] = props[key]
|
|
20
22
|
return ret
|
|
21
23
|
}, {})
|
|
24
|
+
return result
|
|
22
25
|
})
|
|
23
26
|
const buttonActions = inject('buttonActions', {})
|
|
24
27
|
|
|
@@ -311,6 +311,7 @@ const TabNav = defineComponent({
|
|
|
311
311
|
const disabled = pane.props.disabled
|
|
312
312
|
const tabName = pane.props.name ?? pane.index ?? `${index}`
|
|
313
313
|
const closable = !disabled && (pane.isClosable || props.editable)
|
|
314
|
+
const hidden = pane.props.hidden
|
|
314
315
|
pane.index = `${index}`
|
|
315
316
|
|
|
316
317
|
const btnClose = closable ? (
|
|
@@ -339,6 +340,7 @@ const TabNav = defineComponent({
|
|
|
339
340
|
ns.is('closable', closable),
|
|
340
341
|
ns.is('focus', isFocus.value),
|
|
341
342
|
]}
|
|
343
|
+
style={ hidden ? {display: 'none'}: {}}
|
|
342
344
|
id={`tab-${tabName}`}
|
|
343
345
|
key={`tab-${uid}`}
|
|
344
346
|
aria-controls={`pane-${tabName}`}
|
package/src/enums/index.js
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { DATA_VALID_RULE_EXECUTE, GET_SYS_PARAM_CACHE, LCP_LOGIN, QUERY_PAGE_CONFIG_DATA } from "../api/builtIn"
|
|
1
|
+
import { DATA_VALID_RULE_EXECUTE, FIND_FILEA_NND_CONENT_BY_ID, GET_SYS_PARAM_CACHE, LCP_LOGIN, QUERY_PAGE_CONFIG_DATA } from "../api/builtIn"
|
|
2
2
|
|
|
3
|
-
export const USER_NAME = '
|
|
4
|
-
export const PASSWORD = '
|
|
3
|
+
export const USER_NAME = 'caowb3'
|
|
4
|
+
export const PASSWORD = '123456'
|
|
5
|
+
// export const USER_NAME = 'lcpsupport'
|
|
6
|
+
// export const PASSWORD = '8ik,*IK<'
|
|
5
7
|
export const USER_TYPE = '1'
|
|
6
8
|
export const AUTH_CODE = '9887'
|
|
7
9
|
|
|
@@ -9,5 +11,6 @@ export const NOT_AUTH_APIS = [
|
|
|
9
11
|
LCP_LOGIN,
|
|
10
12
|
GET_SYS_PARAM_CACHE,
|
|
11
13
|
QUERY_PAGE_CONFIG_DATA,
|
|
12
|
-
DATA_VALID_RULE_EXECUTE
|
|
14
|
+
DATA_VALID_RULE_EXECUTE,
|
|
15
|
+
FIND_FILEA_NND_CONENT_BY_ID
|
|
13
16
|
]
|
package/src/index.jsx
CHANGED
|
@@ -126,7 +126,12 @@ export default {
|
|
|
126
126
|
messageCb: Function,
|
|
127
127
|
requestTraceId: {
|
|
128
128
|
type: String,
|
|
129
|
-
}
|
|
129
|
+
},
|
|
130
|
+
// 加载上传自定义组件需要的模块集合
|
|
131
|
+
loadModuleCache: {
|
|
132
|
+
type: Object,
|
|
133
|
+
default: () => ({})
|
|
134
|
+
},
|
|
130
135
|
},
|
|
131
136
|
emits: ['update:modelValue', 'rootStoreChange'],
|
|
132
137
|
setup(props, { emit, attrs, expose }) {
|
|
@@ -215,6 +220,7 @@ export default {
|
|
|
215
220
|
})
|
|
216
221
|
toExecuteLoadServices()
|
|
217
222
|
})
|
|
223
|
+
provide('_loadModuleCache', props.loadModuleCache)
|
|
218
224
|
provide('_ruleExecuter', ruleExecuter)
|
|
219
225
|
provide('_toExecuteLoadServices', toExecuteLoadServices)
|
|
220
226
|
provide('_dialogReq', props.dialogReq)
|
package/src/renderer.jsx
CHANGED
|
@@ -41,6 +41,7 @@ export default {
|
|
|
41
41
|
}
|
|
42
42
|
})
|
|
43
43
|
const getNativeComps = inject('_getNativeComps')
|
|
44
|
+
const loadModuleCache = inject('_loadModuleCache')
|
|
44
45
|
const _isH5 = inject('_isH5')
|
|
45
46
|
const injectMode = inject('injectMode', '')
|
|
46
47
|
const mode = props.mode || injectMode
|
|
@@ -56,7 +57,7 @@ export default {
|
|
|
56
57
|
return null
|
|
57
58
|
}
|
|
58
59
|
const disabled = calcDisable(config, mode)
|
|
59
|
-
const component = getComponentForConfig({config, disabled, getNativeComps, isH5: _isH5?.value})
|
|
60
|
+
const component = getComponentForConfig({config, disabled, getNativeComps, isH5: _isH5?.value, loadModuleCache})
|
|
60
61
|
if (component) {
|
|
61
62
|
const layoutPolyfill = generateLayoutPolyfill(config, disabled, _isH5?.value) // // 生成布局框(col)的辅助函数
|
|
62
63
|
return layoutPolyfill(
|
package/src/resolver-common.vue
CHANGED
|
@@ -399,16 +399,16 @@ const allInitEvents = {
|
|
|
399
399
|
})
|
|
400
400
|
return () => {
|
|
401
401
|
// 需要晚点触发,才能正常执行清空等一些列需要组件操作
|
|
402
|
-
return setTimeout(() => {
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
})
|
|
402
|
+
// return setTimeout(() => {
|
|
403
|
+
configs.forEach((labelInfo, idx) => {
|
|
404
|
+
const oldProps = oldPorpsList[idx]
|
|
405
|
+
if (!labelInfo) return
|
|
406
|
+
const porpsKeys = Object.keys(oldProps)
|
|
407
|
+
porpsKeys.forEach(key => {
|
|
408
|
+
labelInfo[key] = oldProps[key]
|
|
410
409
|
})
|
|
411
|
-
}
|
|
410
|
+
})
|
|
411
|
+
// }, 0)
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
414
|
},
|
|
@@ -487,15 +487,15 @@ const allInitEvents = {
|
|
|
487
487
|
// 有的事件在不满足条件的情况下,需要进行恢复
|
|
488
488
|
return () => {
|
|
489
489
|
// 需要晚点触发,才能正常执行清空等一些列需要组件操作
|
|
490
|
-
return setTimeout(() => {
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
})
|
|
490
|
+
// return setTimeout(() => {
|
|
491
|
+
configs.forEach((labelInfo, idx) => {
|
|
492
|
+
const oldProps = oldPorpsList[idx]
|
|
493
|
+
if (!labelInfo) return
|
|
494
|
+
porpsKeys.forEach(key => {
|
|
495
|
+
labelInfo[key] = oldProps[key]
|
|
497
496
|
})
|
|
498
|
-
}
|
|
497
|
+
})
|
|
498
|
+
// }, 0)
|
|
499
499
|
}
|
|
500
500
|
},
|
|
501
501
|
}
|
package/src/rulesImp/events.js
CHANGED
|
@@ -465,16 +465,16 @@ const allInitEvents = {
|
|
|
465
465
|
})
|
|
466
466
|
return () => {
|
|
467
467
|
// 需要晚点触发,才能正常执行清空等一些列需要组件操作
|
|
468
|
-
return setTimeout(() => {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
})
|
|
468
|
+
// return setTimeout(() => {
|
|
469
|
+
configs.forEach((labelInfo, idx) => {
|
|
470
|
+
const oldProps = oldPorpsList[idx]
|
|
471
|
+
if (!labelInfo) return
|
|
472
|
+
const porpsKeys = Object.keys(oldProps)
|
|
473
|
+
porpsKeys.forEach(key => {
|
|
474
|
+
labelInfo[key] = oldProps[key]
|
|
476
475
|
})
|
|
477
|
-
}
|
|
476
|
+
})
|
|
477
|
+
// }, 0)
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
},
|
|
@@ -552,15 +552,15 @@ const allInitEvents = {
|
|
|
552
552
|
// 有的事件在不满足条件的情况下,需要进行恢复
|
|
553
553
|
return () => {
|
|
554
554
|
// 需要晚点触发,才能正常执行清空等一些列需要组件操作
|
|
555
|
-
return setTimeout(() => {
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
})
|
|
555
|
+
// return setTimeout(() => {
|
|
556
|
+
configs.forEach((labelInfo, idx) => {
|
|
557
|
+
const oldProps = oldPorpsList[idx]
|
|
558
|
+
if (!labelInfo) return
|
|
559
|
+
porpsKeys.forEach(key => {
|
|
560
|
+
labelInfo[key] = oldProps[key]
|
|
562
561
|
})
|
|
563
|
-
}
|
|
562
|
+
})
|
|
563
|
+
// }, 0)
|
|
564
564
|
}
|
|
565
565
|
},
|
|
566
566
|
}
|
package/src/utils/const.js
CHANGED
|
@@ -229,4 +229,9 @@ export const META_TYPE_MAP = {
|
|
|
229
229
|
|
|
230
230
|
export {
|
|
231
231
|
commonPropsType as componentPropsType
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (window) {
|
|
235
|
+
!window['resolver-egretimp-plus'] && (window['resolver-egretimp-plus'] = {})
|
|
236
|
+
window['resolver-egretimp-plus']['componentPropsType'] = commonPropsType
|
|
232
237
|
}
|
package/src/utils/loadModule.js
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import * as Vue from 'vue'
|
|
2
2
|
import { loadModule } from 'vue3-sfc-loader'
|
|
3
|
+
import * as Router from 'vue-router'
|
|
4
|
+
import { buildInRequest } from './request'
|
|
5
|
+
import { FIND_FILEA_NND_CONENT_BY_ID } from '../api/builtIn'
|
|
6
|
+
import { resultToast } from './respone'
|
|
3
7
|
|
|
4
8
|
const options = {
|
|
5
9
|
moduleCache: {
|
|
6
10
|
vue: Vue,
|
|
11
|
+
'vue-router': Router,
|
|
7
12
|
},
|
|
8
|
-
|
|
9
13
|
async getFile(url) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
+
return buildInRequest(FIND_FILEA_NND_CONENT_BY_ID, {fileId: url?.originVal?.() || url}).then(ret => {
|
|
15
|
+
if (resultToast(ret.data)) {
|
|
16
|
+
return ret.data.result?.content
|
|
17
|
+
} else {
|
|
18
|
+
return ''
|
|
19
|
+
}
|
|
20
|
+
}).catch(() => {
|
|
21
|
+
return ''
|
|
22
|
+
})
|
|
14
23
|
},
|
|
15
24
|
|
|
16
25
|
addStyle(textContent) {
|
|
@@ -43,6 +52,12 @@ const options = {
|
|
|
43
52
|
}
|
|
44
53
|
}
|
|
45
54
|
|
|
46
|
-
export default function(url) {
|
|
55
|
+
export default function(url, moduleCache) {
|
|
56
|
+
options.moduleCache['resolver-egretimp-plus'] = window['resolver-egretimp-plus']
|
|
57
|
+
options.moduleCache['resolver-egretimp-plus/h5'] = window['resolver-egretimp-plus']
|
|
58
|
+
options.moduleCache['resolver-egretimp-plus/web'] = window['resolver-egretimp-plus']
|
|
59
|
+
Object.keys(moduleCache || {}).forEach(key => {
|
|
60
|
+
options.moduleCache[key] = moduleCache[key]
|
|
61
|
+
})
|
|
47
62
|
return loadModule(url, options)
|
|
48
63
|
}
|
package/src/utils/render.jsx
CHANGED
|
@@ -338,9 +338,9 @@ export function isPlainColumn(config, disabled) {
|
|
|
338
338
|
return false
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
export function getComponentForConfig({config, disabled, getNativeComps}) {
|
|
342
|
-
if (config.
|
|
343
|
-
return () => loadModule(config.
|
|
341
|
+
export function getComponentForConfig({config, disabled, getNativeComps, loadModuleCache}) {
|
|
342
|
+
if (config.isCustom) {
|
|
343
|
+
return () => loadModule(generateVuePath(config.fileId), loadModuleCache)
|
|
344
344
|
}
|
|
345
345
|
// 表格中中的列,是否需要转换为普通形式
|
|
346
346
|
if (isPlainColumn(config, disabled)) {
|
|
@@ -874,4 +874,23 @@ function isTransCellMobile(config, disabled) {
|
|
|
874
874
|
|
|
875
875
|
function isHidden({config}) {
|
|
876
876
|
return (typeof config.hidden === 'boolean' && config.hidden) || config.hidden === '1'
|
|
877
|
-
}
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
function generateVuePath(path) {
|
|
880
|
+
class LoadModulePath extends String {
|
|
881
|
+
constructor(...arg) {
|
|
882
|
+
super(...arg)
|
|
883
|
+
}
|
|
884
|
+
toString(...arg) {
|
|
885
|
+
const ret = super.toString(...arg)
|
|
886
|
+
if (!/\.\w*$/.test(ret)) {
|
|
887
|
+
return `${ret}.vue`
|
|
888
|
+
}
|
|
889
|
+
return ret
|
|
890
|
+
}
|
|
891
|
+
originVal() {
|
|
892
|
+
return path
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
return new LoadModulePath(path)
|
|
896
|
+
}
|