cloud-web-corejs 1.1.0-dev.33 → 1.1.0-dev.35
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/README.md +38 -0
- package/bin/core-resources.js +16 -0
- package/bin/create-child-app.js +34 -0
- package/docs/child-app/README.md +95 -0
- package/docs/child-app/activiti-resources.md +63 -0
- package/docs/child-app/generate-prompt.md +55 -0
- package/docs/child-app/luckysheet-resources.md +80 -0
- package/docs/child-app/public-resources-plan.md +288 -0
- package/docs/child-app/resources-implementation.md +101 -0
- package/docs/child-app/tinymce-resources.md +88 -0
- package/docs/child-app/validation.md +34 -0
- package/docs/qiankun/346/216/245/345/205/245/345/215/217/350/256/256.md +298 -0
- package/docs/qiankun/350/257/246/346/203/205/346/211/277/350/275/275/345/255/220/345/272/224/347/224/250/345/257/271/346/216/245/346/270/205/345/215/225.md +111 -0
- package/package.json +18 -2
- package/resource-tools/index.js +126 -0
- package/src/app-bootstrap.js +7 -2
- package/src/components/Tinymce/dynamicLoadScript.js +51 -59
- package/src/components/Tinymce/index.vue +382 -339
- package/src/components/code-editor/index.vue +361 -343
- package/src/components/luckysheet/loadResources.js +64 -0
- package/src/components/luckysheet/view.vue +239 -210
- package/src/components/xform/form-designer/form-widget/field-widget/dropdown-widget.vue +34 -3
- package/src/utils/featureResources.js +57 -0
- package/src/views/bd/setting/form_template/mixins/list.js +7 -6
- package/src/views/bd/setting/form_template/mixins/list2.js +412 -411
- package/src/views/bd/setting/form_template/mixins/wf_list.js +431 -430
- package/src/views/user/form/form_template/list.vue +513 -512
- package/src/views/user/wf/wf_obj_config/activiti_wf.vue +134 -133
- package/src/views/user/wf/wf_obj_config/list.vue +747 -746
- package/src/views/user/wf/wf_obj_config/list_form.vue +374 -373
- package/templates/child-app/.env +3 -0
- package/templates/child-app/README.md +49 -0
- package/templates/child-app/app.config.js +6 -0
- package/templates/child-app/babel.config.js +1 -0
- package/templates/child-app/core-resources.config.js +15 -0
- package/templates/child-app/gitignore +7 -0
- package/templates/child-app/package.json +34 -0
- package/templates/child-app/public/index.html +12 -0
- package/templates/child-app/src/assets/401_images/401.gif +0 -0
- package/templates/child-app/src/assets/404_images/404.png +0 -0
- package/templates/child-app/src/assets/404_images/404_cloud.png +0 -0
- package/templates/child-app/src/assets/logo.png +0 -0
- package/templates/child-app/src/corejsConfig.js +2 -0
- package/templates/child-app/src/icons/index.js +2 -0
- package/templates/child-app/src/icons/svg/child-demo.svg +1 -0
- package/templates/child-app/src/layout/index.vue +4 -0
- package/templates/child-app/src/main.js +5 -0
- package/templates/child-app/src/prefixConfig.js +13 -0
- package/templates/child-app/src/resources/css/login.scss +29 -0
- package/templates/child-app/src/resources/images/bg-login5.jpg +0 -0
- package/templates/child-app/src/resources/images/home-img.png +0 -0
- package/templates/child-app/src/router/modules/customer.js +3 -0
- package/templates/child-app/src/settings.js +24 -0
- package/templates/child-app/src/styles/app.scss +2 -0
- package/templates/child-app/src/views/demo/detail.vue +19 -0
- package/templates/child-app/src/views/demo/list.vue +38 -0
- package/templates/child-app/src/views/user/login/index.vue +18 -0
- package/templates/child-app/vue.config.js +107 -0
|
@@ -1,59 +1,51 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
return
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
document.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
cb(null, script) // there is no way to catch loading errors in IE8
|
|
53
|
-
}
|
|
54
|
-
callbacks = null
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
export default dynamicLoadScript
|
|
1
|
+
// Requests are shared only within this application's module scope.
|
|
2
|
+
const pending = new Map();
|
|
3
|
+
let loadedSource = "";
|
|
4
|
+
|
|
5
|
+
export function loadTinymce(src) {
|
|
6
|
+
if (pending.has(src)) return pending.get(src);
|
|
7
|
+
if (window.tinymce) {
|
|
8
|
+
const expectedBase = new URL(".", src).href.replace(/\/$/, "");
|
|
9
|
+
const actualBase = new URL(window.tinymce.baseURL || "/", window.location.href).href.replace(/\/$/, "");
|
|
10
|
+
if (String(window.tinymce.majorVersion) !== "4" || String(window.tinymce.minorVersion) !== "9.2"
|
|
11
|
+
|| (loadedSource !== src && actualBase !== expectedBase)) {
|
|
12
|
+
return Promise.reject(new Error(`TinyMCE 已存在不同版本或来源的全局实例,拒绝覆盖:${src}`));
|
|
13
|
+
}
|
|
14
|
+
return Promise.resolve(window.tinymce);
|
|
15
|
+
}
|
|
16
|
+
const promise = new Promise((resolve, reject) => {
|
|
17
|
+
const script = document.createElement("script");
|
|
18
|
+
script.src = src;
|
|
19
|
+
script.dataset.coreResource = "richText";
|
|
20
|
+
let settled = false;
|
|
21
|
+
const timer = setTimeout(() => finish(new Error(`TinyMCE 加载超时:${src}`)), 30000);
|
|
22
|
+
function finish(error) {
|
|
23
|
+
if (settled) return;
|
|
24
|
+
settled = true;
|
|
25
|
+
clearTimeout(timer);
|
|
26
|
+
script.onload = script.onerror = null;
|
|
27
|
+
if (error) {
|
|
28
|
+
if (script.parentNode) script.parentNode.removeChild(script);
|
|
29
|
+
reject(error);
|
|
30
|
+
} else {
|
|
31
|
+
loadedSource = src;
|
|
32
|
+
resolve(window.tinymce);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
script.onload = () => {
|
|
36
|
+
if (!window.tinymce || String(window.tinymce.majorVersion) !== "4" || String(window.tinymce.minorVersion) !== "9.2") {
|
|
37
|
+
finish(new Error(`TinyMCE 脚本未提供兼容的 4.9.2 实例:${src}`));
|
|
38
|
+
} else finish();
|
|
39
|
+
};
|
|
40
|
+
script.onerror = () => finish(new Error(`TinyMCE 加载失败:${src}`));
|
|
41
|
+
document.body.appendChild(script);
|
|
42
|
+
});
|
|
43
|
+
pending.set(src, promise);
|
|
44
|
+
const clear = () => pending.delete(src);
|
|
45
|
+
promise.then(clear, clear);
|
|
46
|
+
return promise;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default function load(src, callback) {
|
|
50
|
+
loadTinymce(src).then(() => callback(null), error => callback(error));
|
|
51
|
+
}
|