@zhubangyun/lowcode-core 5.4.251 → 5.4.261
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/es/index.d.ts +1 -0
- package/es/index.js +1 -0
- package/es/index.less +97 -0
- package/es/style.js +2 -1
- package/es/utils/page/index.d.ts +2 -0
- package/es/utils/page/index.js +62 -15
- package/es/utils/page/page-form.js +0 -1
- package/es/utils/page/page-load-schema.js +14 -8
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.less +97 -0
- package/lib/style.js +2 -1
- package/lib/utils/page/index.d.ts +2 -0
- package/lib/utils/page/index.js +64 -15
- package/lib/utils/page/page-form.js +0 -1
- package/lib/utils/page/page-load-schema.js +14 -8
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.less
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#fullscreen-loading {
|
|
2
|
+
position: fixed;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: 10;
|
|
8
|
+
background: white;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.page-loading {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
z-index: 10;
|
|
19
|
+
background: white;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.atom-spinner, .atom-spinner * {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.atom-spinner {
|
|
31
|
+
height: 60px;
|
|
32
|
+
width: 60px;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.atom-spinner .spinner-inner {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: block;
|
|
39
|
+
height: 100%;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.atom-spinner .spinner-circle {
|
|
44
|
+
display: block;
|
|
45
|
+
position: absolute;
|
|
46
|
+
color: #1677ff;
|
|
47
|
+
font-size: calc(60px * 0.24);
|
|
48
|
+
top: 50%;
|
|
49
|
+
left: 50%;
|
|
50
|
+
transform: translate(-50%, -50%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.atom-spinner .spinner-line {
|
|
54
|
+
position: absolute;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
border-left-width: calc(60px / 25);
|
|
59
|
+
border-top-width: calc(60px / 25);
|
|
60
|
+
border-left-color: #1677ff;
|
|
61
|
+
border-left-style: solid;
|
|
62
|
+
border-top-style: solid;
|
|
63
|
+
border-top-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.atom-spinner .spinner-line:nth-child(1) {
|
|
67
|
+
animation: atom-spinner-animation-1 1s linear infinite;
|
|
68
|
+
transform: rotateZ(120deg) rotateX(66deg) rotateZ(0deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.atom-spinner .spinner-line:nth-child(2) {
|
|
72
|
+
animation: atom-spinner-animation-2 1s linear infinite;
|
|
73
|
+
transform: rotateZ(240deg) rotateX(66deg) rotateZ(0deg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.atom-spinner .spinner-line:nth-child(3) {
|
|
77
|
+
animation: atom-spinner-animation-3 1s linear infinite;
|
|
78
|
+
transform: rotateZ(360deg) rotateX(66deg) rotateZ(0deg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes atom-spinner-animation-1 {
|
|
82
|
+
100% {
|
|
83
|
+
transform: rotateZ(120deg) rotateX(66deg) rotateZ(360deg);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes atom-spinner-animation-2 {
|
|
88
|
+
100% {
|
|
89
|
+
transform: rotateZ(240deg) rotateX(66deg) rotateZ(360deg);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@keyframes atom-spinner-animation-3 {
|
|
94
|
+
100% {
|
|
95
|
+
transform: rotateZ(360deg) rotateX(66deg) rotateZ(360deg);
|
|
96
|
+
}
|
|
97
|
+
}
|
package/es/style.js
CHANGED
package/es/utils/page/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { showForm } from "./page-form";
|
|
2
|
+
export declare function showLoading(): Promise<void>;
|
|
3
|
+
export declare function hideLoading(): Promise<void>;
|
|
2
4
|
export declare function openPage(url: string, target?: string): Promise<any>;
|
|
3
5
|
export declare function closePage(url: string, target?: string): Promise<void>;
|
package/es/utils/page/index.js
CHANGED
|
@@ -1,41 +1,88 @@
|
|
|
1
1
|
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
2
|
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
3
3
|
export { showForm } from "./page-form";
|
|
4
|
+
export function showLoading() {
|
|
5
|
+
return _showLoading.apply(this, arguments);
|
|
6
|
+
}
|
|
7
|
+
function _showLoading() {
|
|
8
|
+
_showLoading = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
9
|
+
var loading, div;
|
|
10
|
+
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
|
11
|
+
while (1) switch (_context.prev = _context.next) {
|
|
12
|
+
case 0:
|
|
13
|
+
loading = document.getElementById("fullscreen-loading");
|
|
14
|
+
if (loading) {
|
|
15
|
+
loading.style.display = "flex";
|
|
16
|
+
} else {
|
|
17
|
+
div = document.createElement("div");
|
|
18
|
+
div.id = "fullscreen-loading";
|
|
19
|
+
div.innerHTML = "\n <div class=\"atom-spinner\">\n <div class=\"spinner-inner\">\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-circle\"></div>\n </div>\n </div>\n ";
|
|
20
|
+
document.body.appendChild(div);
|
|
21
|
+
}
|
|
22
|
+
case 2:
|
|
23
|
+
case "end":
|
|
24
|
+
return _context.stop();
|
|
25
|
+
}
|
|
26
|
+
}, _callee);
|
|
27
|
+
}));
|
|
28
|
+
return _showLoading.apply(this, arguments);
|
|
29
|
+
}
|
|
30
|
+
export function hideLoading() {
|
|
31
|
+
return _hideLoading.apply(this, arguments);
|
|
32
|
+
}
|
|
33
|
+
function _hideLoading() {
|
|
34
|
+
_hideLoading = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
35
|
+
var loading;
|
|
36
|
+
return _regeneratorRuntime.wrap(function _callee2$(_context2) {
|
|
37
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
38
|
+
case 0:
|
|
39
|
+
loading = document.getElementById("fullscreen-loading");
|
|
40
|
+
if (loading) {
|
|
41
|
+
loading.style.display = "none";
|
|
42
|
+
}
|
|
43
|
+
case 2:
|
|
44
|
+
case "end":
|
|
45
|
+
return _context2.stop();
|
|
46
|
+
}
|
|
47
|
+
}, _callee2);
|
|
48
|
+
}));
|
|
49
|
+
return _hideLoading.apply(this, arguments);
|
|
50
|
+
}
|
|
4
51
|
export function openPage(_x, _x2) {
|
|
5
52
|
return _openPage.apply(this, arguments);
|
|
6
53
|
}
|
|
7
54
|
function _openPage() {
|
|
8
|
-
_openPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
55
|
+
_openPage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(url, target) {
|
|
9
56
|
var _window$parent;
|
|
10
57
|
var page, func;
|
|
11
|
-
return _regeneratorRuntime.wrap(function
|
|
12
|
-
while (1) switch (
|
|
58
|
+
return _regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
59
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
13
60
|
case 0:
|
|
14
61
|
// @ts-ignore
|
|
15
62
|
func = (_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.openWorkPlatformTab;
|
|
16
63
|
if (!func) {
|
|
17
|
-
|
|
64
|
+
_context3.next = 7;
|
|
18
65
|
break;
|
|
19
66
|
}
|
|
20
|
-
|
|
67
|
+
_context3.next = 4;
|
|
21
68
|
return func({
|
|
22
69
|
value: target,
|
|
23
70
|
url: url
|
|
24
71
|
});
|
|
25
72
|
case 4:
|
|
26
|
-
page =
|
|
27
|
-
|
|
73
|
+
page = _context3.sent;
|
|
74
|
+
_context3.next = 8;
|
|
28
75
|
break;
|
|
29
76
|
case 7:
|
|
30
77
|
page = window.open(url, target);
|
|
31
78
|
case 8:
|
|
32
79
|
console.debug("openPage", page, target);
|
|
33
|
-
return
|
|
80
|
+
return _context3.abrupt("return", page);
|
|
34
81
|
case 10:
|
|
35
82
|
case "end":
|
|
36
|
-
return
|
|
83
|
+
return _context3.stop();
|
|
37
84
|
}
|
|
38
|
-
},
|
|
85
|
+
}, _callee3);
|
|
39
86
|
}));
|
|
40
87
|
return _openPage.apply(this, arguments);
|
|
41
88
|
}
|
|
@@ -43,11 +90,11 @@ export function closePage(_x3, _x4) {
|
|
|
43
90
|
return _closePage.apply(this, arguments);
|
|
44
91
|
}
|
|
45
92
|
function _closePage() {
|
|
46
|
-
_closePage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function
|
|
93
|
+
_closePage = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(url, target) {
|
|
47
94
|
var _window$parent2;
|
|
48
95
|
var func;
|
|
49
|
-
return _regeneratorRuntime.wrap(function
|
|
50
|
-
while (1) switch (
|
|
96
|
+
return _regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
97
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
51
98
|
case 0:
|
|
52
99
|
// @ts-ignore
|
|
53
100
|
func = (_window$parent2 = window.parent) === null || _window$parent2 === void 0 ? void 0 : _window$parent2.closeWorkPlatformTab;
|
|
@@ -61,9 +108,9 @@ function _closePage() {
|
|
|
61
108
|
}
|
|
62
109
|
case 2:
|
|
63
110
|
case "end":
|
|
64
|
-
return
|
|
111
|
+
return _context4.stop();
|
|
65
112
|
}
|
|
66
|
-
},
|
|
113
|
+
}, _callee4);
|
|
67
114
|
}));
|
|
68
115
|
return _closePage.apply(this, arguments);
|
|
69
116
|
}
|
|
@@ -114,7 +114,6 @@ var FormRender = /*#__PURE__*/function (_Component) {
|
|
|
114
114
|
}, /*#__PURE__*/React.createElement(PageLoadSchema, {
|
|
115
115
|
pageId: form === null || form === void 0 ? void 0 : form.id
|
|
116
116
|
}, function (schema) {
|
|
117
|
-
console.log(window._components || window.components || window.__components);
|
|
118
117
|
return /*#__PURE__*/React.createElement(ReactRender, _extends({
|
|
119
118
|
schema: schema,
|
|
120
119
|
components: window._components || window.components || window.__components
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _Result from "antd/es/result";
|
|
2
|
-
import _Spin from "antd/es/spin";
|
|
3
2
|
import _message from "antd/es/message";
|
|
4
3
|
import { useEffect, useState } from "react";
|
|
5
4
|
import { getSchema } from "../api";
|
|
@@ -34,13 +33,20 @@ export function PageLoadSchema(props) {
|
|
|
34
33
|
}, []);
|
|
35
34
|
if (loading) {
|
|
36
35
|
return /*#__PURE__*/React.createElement("div", {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
36
|
+
className: "page-loading"
|
|
37
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
className: "atom-spinner"
|
|
39
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
40
|
+
className: "spinner-inner"
|
|
41
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
42
|
+
className: "spinner-line"
|
|
43
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
44
|
+
className: "spinner-line"
|
|
45
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
46
|
+
className: "spinner-line"
|
|
47
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "spinner-circle"
|
|
49
|
+
}))));
|
|
44
50
|
}
|
|
45
51
|
if (!schema) {
|
|
46
52
|
return /*#__PURE__*/React.createElement(_Result, {
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.apiRequest = exports.RestFormApi = exports.RestApi = exports.Layout = void 0;
|
|
6
|
+
require("./index.less");
|
|
6
7
|
var _utils = _interopRequireDefault(require("./utils"));
|
|
7
8
|
exports.utils = _utils["default"];
|
|
8
9
|
var _reactRender = require("./components/react-render");
|
package/lib/index.less
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#fullscreen-loading {
|
|
2
|
+
position: fixed;
|
|
3
|
+
width: 100vw;
|
|
4
|
+
height: 100vh;
|
|
5
|
+
top: 0;
|
|
6
|
+
left: 0;
|
|
7
|
+
z-index: 10;
|
|
8
|
+
background: white;
|
|
9
|
+
display: flex;
|
|
10
|
+
justify-content: center;
|
|
11
|
+
align-items: center;
|
|
12
|
+
overflow: hidden;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.page-loading {
|
|
16
|
+
width: 100%;
|
|
17
|
+
height: 100%;
|
|
18
|
+
z-index: 10;
|
|
19
|
+
background: white;
|
|
20
|
+
display: flex;
|
|
21
|
+
justify-content: center;
|
|
22
|
+
align-items: center;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.atom-spinner, .atom-spinner * {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.atom-spinner {
|
|
31
|
+
height: 60px;
|
|
32
|
+
width: 60px;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.atom-spinner .spinner-inner {
|
|
37
|
+
position: relative;
|
|
38
|
+
display: block;
|
|
39
|
+
height: 100%;
|
|
40
|
+
width: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.atom-spinner .spinner-circle {
|
|
44
|
+
display: block;
|
|
45
|
+
position: absolute;
|
|
46
|
+
color: #1677ff;
|
|
47
|
+
font-size: calc(60px * 0.24);
|
|
48
|
+
top: 50%;
|
|
49
|
+
left: 50%;
|
|
50
|
+
transform: translate(-50%, -50%);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.atom-spinner .spinner-line {
|
|
54
|
+
position: absolute;
|
|
55
|
+
width: 100%;
|
|
56
|
+
height: 100%;
|
|
57
|
+
border-radius: 50%;
|
|
58
|
+
border-left-width: calc(60px / 25);
|
|
59
|
+
border-top-width: calc(60px / 25);
|
|
60
|
+
border-left-color: #1677ff;
|
|
61
|
+
border-left-style: solid;
|
|
62
|
+
border-top-style: solid;
|
|
63
|
+
border-top-color: transparent;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.atom-spinner .spinner-line:nth-child(1) {
|
|
67
|
+
animation: atom-spinner-animation-1 1s linear infinite;
|
|
68
|
+
transform: rotateZ(120deg) rotateX(66deg) rotateZ(0deg);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.atom-spinner .spinner-line:nth-child(2) {
|
|
72
|
+
animation: atom-spinner-animation-2 1s linear infinite;
|
|
73
|
+
transform: rotateZ(240deg) rotateX(66deg) rotateZ(0deg);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.atom-spinner .spinner-line:nth-child(3) {
|
|
77
|
+
animation: atom-spinner-animation-3 1s linear infinite;
|
|
78
|
+
transform: rotateZ(360deg) rotateX(66deg) rotateZ(0deg);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
@keyframes atom-spinner-animation-1 {
|
|
82
|
+
100% {
|
|
83
|
+
transform: rotateZ(120deg) rotateX(66deg) rotateZ(360deg);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@keyframes atom-spinner-animation-2 {
|
|
88
|
+
100% {
|
|
89
|
+
transform: rotateZ(240deg) rotateX(66deg) rotateZ(360deg);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@keyframes atom-spinner-animation-3 {
|
|
94
|
+
100% {
|
|
95
|
+
transform: rotateZ(360deg) rotateX(66deg) rotateZ(360deg);
|
|
96
|
+
}
|
|
97
|
+
}
|
package/lib/style.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { showForm } from "./page-form";
|
|
2
|
+
export declare function showLoading(): Promise<void>;
|
|
3
|
+
export declare function hideLoading(): Promise<void>;
|
|
2
4
|
export declare function openPage(url: string, target?: string): Promise<any>;
|
|
3
5
|
export declare function closePage(url: string, target?: string): Promise<void>;
|
package/lib/utils/page/index.js
CHANGED
|
@@ -3,47 +3,96 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.closePage = closePage;
|
|
6
|
+
exports.hideLoading = hideLoading;
|
|
6
7
|
exports.openPage = openPage;
|
|
7
8
|
exports.showForm = void 0;
|
|
9
|
+
exports.showLoading = showLoading;
|
|
8
10
|
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
9
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
10
12
|
var _pageForm = require("./page-form");
|
|
11
13
|
exports.showForm = _pageForm.showForm;
|
|
14
|
+
function showLoading() {
|
|
15
|
+
return _showLoading.apply(this, arguments);
|
|
16
|
+
}
|
|
17
|
+
function _showLoading() {
|
|
18
|
+
_showLoading = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
19
|
+
var loading, div;
|
|
20
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
21
|
+
while (1) switch (_context.prev = _context.next) {
|
|
22
|
+
case 0:
|
|
23
|
+
loading = document.getElementById("fullscreen-loading");
|
|
24
|
+
if (loading) {
|
|
25
|
+
loading.style.display = "flex";
|
|
26
|
+
} else {
|
|
27
|
+
div = document.createElement("div");
|
|
28
|
+
div.id = "fullscreen-loading";
|
|
29
|
+
div.innerHTML = "\n <div class=\"atom-spinner\">\n <div class=\"spinner-inner\">\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-line\"></div>\n <div class=\"spinner-circle\"></div>\n </div>\n </div>\n ";
|
|
30
|
+
document.body.appendChild(div);
|
|
31
|
+
}
|
|
32
|
+
case 2:
|
|
33
|
+
case "end":
|
|
34
|
+
return _context.stop();
|
|
35
|
+
}
|
|
36
|
+
}, _callee);
|
|
37
|
+
}));
|
|
38
|
+
return _showLoading.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
function hideLoading() {
|
|
41
|
+
return _hideLoading.apply(this, arguments);
|
|
42
|
+
}
|
|
43
|
+
function _hideLoading() {
|
|
44
|
+
_hideLoading = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
45
|
+
var loading;
|
|
46
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
47
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
48
|
+
case 0:
|
|
49
|
+
loading = document.getElementById("fullscreen-loading");
|
|
50
|
+
if (loading) {
|
|
51
|
+
loading.style.display = "none";
|
|
52
|
+
}
|
|
53
|
+
case 2:
|
|
54
|
+
case "end":
|
|
55
|
+
return _context2.stop();
|
|
56
|
+
}
|
|
57
|
+
}, _callee2);
|
|
58
|
+
}));
|
|
59
|
+
return _hideLoading.apply(this, arguments);
|
|
60
|
+
}
|
|
12
61
|
function openPage(_x, _x2) {
|
|
13
62
|
return _openPage.apply(this, arguments);
|
|
14
63
|
}
|
|
15
64
|
function _openPage() {
|
|
16
|
-
_openPage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
65
|
+
_openPage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3(url, target) {
|
|
17
66
|
var _window$parent;
|
|
18
67
|
var page, func;
|
|
19
|
-
return _regenerator["default"].wrap(function
|
|
20
|
-
while (1) switch (
|
|
68
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
69
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
21
70
|
case 0:
|
|
22
71
|
// @ts-ignore
|
|
23
72
|
func = (_window$parent = window.parent) === null || _window$parent === void 0 ? void 0 : _window$parent.openWorkPlatformTab;
|
|
24
73
|
if (!func) {
|
|
25
|
-
|
|
74
|
+
_context3.next = 7;
|
|
26
75
|
break;
|
|
27
76
|
}
|
|
28
|
-
|
|
77
|
+
_context3.next = 4;
|
|
29
78
|
return func({
|
|
30
79
|
value: target,
|
|
31
80
|
url: url
|
|
32
81
|
});
|
|
33
82
|
case 4:
|
|
34
|
-
page =
|
|
35
|
-
|
|
83
|
+
page = _context3.sent;
|
|
84
|
+
_context3.next = 8;
|
|
36
85
|
break;
|
|
37
86
|
case 7:
|
|
38
87
|
page = window.open(url, target);
|
|
39
88
|
case 8:
|
|
40
89
|
console.debug("openPage", page, target);
|
|
41
|
-
return
|
|
90
|
+
return _context3.abrupt("return", page);
|
|
42
91
|
case 10:
|
|
43
92
|
case "end":
|
|
44
|
-
return
|
|
93
|
+
return _context3.stop();
|
|
45
94
|
}
|
|
46
|
-
},
|
|
95
|
+
}, _callee3);
|
|
47
96
|
}));
|
|
48
97
|
return _openPage.apply(this, arguments);
|
|
49
98
|
}
|
|
@@ -51,11 +100,11 @@ function closePage(_x3, _x4) {
|
|
|
51
100
|
return _closePage.apply(this, arguments);
|
|
52
101
|
}
|
|
53
102
|
function _closePage() {
|
|
54
|
-
_closePage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function
|
|
103
|
+
_closePage = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4(url, target) {
|
|
55
104
|
var _window$parent2;
|
|
56
105
|
var func;
|
|
57
|
-
return _regenerator["default"].wrap(function
|
|
58
|
-
while (1) switch (
|
|
106
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
107
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
59
108
|
case 0:
|
|
60
109
|
// @ts-ignore
|
|
61
110
|
func = (_window$parent2 = window.parent) === null || _window$parent2 === void 0 ? void 0 : _window$parent2.closeWorkPlatformTab;
|
|
@@ -69,9 +118,9 @@ function _closePage() {
|
|
|
69
118
|
}
|
|
70
119
|
case 2:
|
|
71
120
|
case "end":
|
|
72
|
-
return
|
|
121
|
+
return _context4.stop();
|
|
73
122
|
}
|
|
74
|
-
},
|
|
123
|
+
}, _callee4);
|
|
75
124
|
}));
|
|
76
125
|
return _closePage.apply(this, arguments);
|
|
77
126
|
}
|
|
@@ -121,7 +121,6 @@ var FormRender = /*#__PURE__*/function (_Component) {
|
|
|
121
121
|
}, /*#__PURE__*/_react["default"].createElement(_pageLoadSchema.PageLoadSchema, {
|
|
122
122
|
pageId: form === null || form === void 0 ? void 0 : form.id
|
|
123
123
|
}, function (schema) {
|
|
124
|
-
console.log(window._components || window.components || window.__components);
|
|
125
124
|
return /*#__PURE__*/_react["default"].createElement(_reactRender.ReactRender, (0, _extends2["default"])({
|
|
126
125
|
schema: schema,
|
|
127
126
|
components: window._components || window.components || window.__components
|
|
@@ -4,7 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.PageLoadSchema = PageLoadSchema;
|
|
6
6
|
var _result = _interopRequireDefault(require("antd/lib/result"));
|
|
7
|
-
var _spin = _interopRequireDefault(require("antd/lib/spin"));
|
|
8
7
|
var _message2 = _interopRequireDefault(require("antd/lib/message"));
|
|
9
8
|
var _react = require("react");
|
|
10
9
|
var _api = require("../api");
|
|
@@ -39,13 +38,20 @@ function PageLoadSchema(props) {
|
|
|
39
38
|
}, []);
|
|
40
39
|
if (loading) {
|
|
41
40
|
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
className: "page-loading"
|
|
42
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: "atom-spinner"
|
|
44
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: "spinner-inner"
|
|
46
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "spinner-line"
|
|
48
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
49
|
+
className: "spinner-line"
|
|
50
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
className: "spinner-line"
|
|
52
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
53
|
+
className: "spinner-circle"
|
|
54
|
+
}))));
|
|
49
55
|
}
|
|
50
56
|
if (!schema) {
|
|
51
57
|
return /*#__PURE__*/React.createElement(_result["default"], {
|