resolver-egretimp-plus 0.0.64 → 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.
- package/dist/const/index.js +1 -0
- package/dist/h5/index.js +1796 -1
- package/dist/h5/index.js.LICENSE.txt +42 -0
- package/dist/web/index.js +1796 -1
- package/dist/web/index.js.LICENSE.txt +42 -0
- package/package.json +5 -1
- package/scripts/webpack.config.js +1 -0
- package/src/analysisComponent.jsx +4 -0
- package/src/components/packages-H5/CustomComponentTableH5.vue +1 -1
- package/src/components/packages-web/CustomComponentTable.jsx +1 -1
- package/src/hooks/mock.js +5877 -378
- package/src/hooks/pageConfig.js +2 -2
- package/src/hooks/testcomp.js +0 -0
- package/src/utils/loadModule.js +48 -0
- package/src/utils/render.jsx +4 -0
- package/src/utils/vue3-sfc-loader.js +1831 -0
package/src/hooks/pageConfig.js
CHANGED
|
@@ -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
|
-
|
|
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
|
+
}
|
package/src/utils/render.jsx
CHANGED
|
@@ -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) {
|
|
@@ -328,6 +329,9 @@ export function isPlainColumn(config, disabled) {
|
|
|
328
329
|
}
|
|
329
330
|
|
|
330
331
|
export function getComponentForConfig({config, disabled, getNativeComps}) {
|
|
332
|
+
if (config.isCustomComp) {
|
|
333
|
+
return () => loadModule(config.url)
|
|
334
|
+
}
|
|
331
335
|
// 表格中中的列,是否需要转换为普通形式
|
|
332
336
|
if (isPlainColumn(config, disabled)) {
|
|
333
337
|
return CustomComponentPlain
|