@zgfe/modules-page 1.0.8-lijingyu1538.1 → 1.0.17-zhongyuan.12
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 +35 -35
- package/dist/esm/components/content/index.js +8 -2
- package/dist/esm/components/content/index.less +6 -0
- package/dist/esm/components/content/utils.js +15 -9
- package/dist/esm/components/detail/index.js +2 -2
- package/dist/esm/components/detail/index.less +80 -80
- package/dist/esm/components/groupModal/index.js +1 -1
- package/dist/esm/components/groupModal/index.less +198 -198
- package/dist/esm/components/pageSelect/index.js +71 -4
- package/dist/esm/components/pageSelect/index.less +109 -57
- package/dist/esm/components/searchPanel/index.js +10 -1
- package/dist/esm/components/searchPanel/index.less +33 -33
- package/dist/esm/components/searchPanel/util.js +4 -4
- package/dist/esm/components/topContent/index.d.ts +1 -1
- package/dist/esm/components/topContent/index.js +5 -5
- package/dist/esm/components/topContent/index.less +10 -10
- package/dist/esm/modules/empty/index.less +95 -95
- package/dist/esm/modules/home/demo/index.js +56 -51
- package/dist/esm/modules/home/index.js +35 -6
- package/dist/esm/modules/home/style/index.less +59 -45
- package/dist/esm/modules/home/types.d.ts +2 -0
- package/dist/esm/modules/home/types.js +2 -1
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
|
-
# modules-page
|
|
2
|
-
|
|
3
|
-
页面
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
Install dependencies,
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
$ npm i
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Start the dev server,
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
$ npm start
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Build documentation,
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
$ npm run docs:build
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
Run test,
|
|
26
|
-
|
|
27
|
-
```bash
|
|
28
|
-
$ npm test
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Build library via `father`,
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
$ npm run build
|
|
35
|
-
```
|
|
1
|
+
# modules-page
|
|
2
|
+
|
|
3
|
+
页面
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
Install dependencies,
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
$ npm i
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Start the dev server,
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
$ npm start
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Build documentation,
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
$ npm run docs:build
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Run test,
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
$ npm test
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Build library via `father`,
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
$ npm run build
|
|
35
|
+
```
|
|
@@ -9,7 +9,8 @@ import emptyImg from "../detail/images/empty.png";
|
|
|
9
9
|
var PageContent = function PageContent(props) {
|
|
10
10
|
var classPrefix = 'page-content';
|
|
11
11
|
var _useContext = useContext(ModulesPageContext),
|
|
12
|
-
pageGroupList = _useContext.pageGroupList
|
|
12
|
+
pageGroupList = _useContext.pageGroupList,
|
|
13
|
+
isAppAnalysis = _useContext.isAppAnalysis;
|
|
13
14
|
var groupList = useMemo(function () {
|
|
14
15
|
if (!pageGroupList) return [];
|
|
15
16
|
var data = _.cloneDeep(pageGroupList);
|
|
@@ -45,7 +46,12 @@ var PageContent = function PageContent(props) {
|
|
|
45
46
|
}
|
|
46
47
|
return /*#__PURE__*/React.createElement("div", {
|
|
47
48
|
className: classPrefix
|
|
48
|
-
}, /*#__PURE__*/React.createElement(
|
|
49
|
+
}, isAppAnalysis && /*#__PURE__*/React.createElement("div", null, [1, 2].map(function (o, index) {
|
|
50
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
|
+
key: index,
|
|
52
|
+
className: "anslysis-tip"
|
|
53
|
+
}, /*#__PURE__*/React.createElement("span", null, "\u6240\u6709\u7528\u6237 >"), /*#__PURE__*/React.createElement("span", null, "\u6D4F\u89C8\u6B21\u6570\uFF1A159", o), /*#__PURE__*/React.createElement("span", null, "\u6D4F\u89C8\u4EBA\u6570\uFF1A159"), /*#__PURE__*/React.createElement("span", null, "\u70B9\u51FB\u6B21\u6570\uFF1A159"), /*#__PURE__*/React.createElement("span", null, "\u70B9\u51FB\u4EBA\u6570\uFF1A159"));
|
|
54
|
+
})), /*#__PURE__*/React.createElement(BizTable, {
|
|
49
55
|
rowKey: "id",
|
|
50
56
|
dataSource: props.type === 'pageGroup' ? groupList : props.value,
|
|
51
57
|
columns: columns
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IconFont, util } from '@zgfe/business-lib';
|
|
2
2
|
import { Tooltip } from 'antd';
|
|
3
|
-
import React
|
|
3
|
+
import React from 'react';
|
|
4
4
|
export var getColumns = function getColumns(type, hasUserGroup, onClickCallback, onEditCallback) {
|
|
5
|
-
var _useContext = useContext(BizGlobalDataContext),
|
|
6
|
-
currentApp = _useContext.currentApp;
|
|
7
5
|
var pageColumns = [{
|
|
8
6
|
title: '页面',
|
|
9
7
|
dataIndex: 'page',
|
|
@@ -36,14 +34,22 @@ export var getColumns = function getColumns(type, hasUserGroup, onClickCallback,
|
|
|
36
34
|
var _navigator;
|
|
37
35
|
e.stopPropagation();
|
|
38
36
|
if (!(record !== null && record !== void 0 && record.pageUrl)) return;
|
|
39
|
-
|
|
37
|
+
function copy() {
|
|
40
38
|
var el = document.createElement('textarea');
|
|
41
39
|
el.value = record.pageUrl || '';
|
|
42
40
|
document.body.appendChild(el);
|
|
43
41
|
el.select();
|
|
44
42
|
document.execCommand('copy');
|
|
45
43
|
document.body.removeChild(el);
|
|
46
|
-
}
|
|
44
|
+
}
|
|
45
|
+
if (navigator.clipboard && (_navigator = navigator) !== null && _navigator !== void 0 && (_navigator = _navigator.clipboard) !== null && _navigator !== void 0 && _navigator.writeText) {
|
|
46
|
+
var _navigator2;
|
|
47
|
+
(_navigator2 = navigator) === null || _navigator2 === void 0 || (_navigator2 = _navigator2.clipboard) === null || _navigator2 === void 0 || _navigator2.writeText(record === null || record === void 0 ? void 0 : record.pageUrl).catch(function () {
|
|
48
|
+
copy();
|
|
49
|
+
});
|
|
50
|
+
} else {
|
|
51
|
+
copy();
|
|
52
|
+
}
|
|
47
53
|
}
|
|
48
54
|
})));
|
|
49
55
|
}
|
|
@@ -64,7 +70,7 @@ export var getColumns = function getColumns(type, hasUserGroup, onClickCallback,
|
|
|
64
70
|
return toThousands(txt);
|
|
65
71
|
}
|
|
66
72
|
}, {
|
|
67
|
-
title:
|
|
73
|
+
title: '人数',
|
|
68
74
|
dataIndex: 'viewUser',
|
|
69
75
|
key: 'viewUser',
|
|
70
76
|
align: 'right',
|
|
@@ -93,7 +99,7 @@ export var getColumns = function getColumns(type, hasUserGroup, onClickCallback,
|
|
|
93
99
|
return toThousands(txt);
|
|
94
100
|
}
|
|
95
101
|
}, {
|
|
96
|
-
title:
|
|
102
|
+
title: '人数',
|
|
97
103
|
dataIndex: 'clickUser',
|
|
98
104
|
key: 'clickUser',
|
|
99
105
|
align: 'right',
|
|
@@ -108,7 +114,7 @@ export var getColumns = function getColumns(type, hasUserGroup, onClickCallback,
|
|
|
108
114
|
}, {
|
|
109
115
|
title: /*#__PURE__*/React.createElement("div", {
|
|
110
116
|
className: "thread-title"
|
|
111
|
-
}, "\u70B9\u51FB
|
|
117
|
+
}, "\u70B9\u51FB\u4EBA\u6570\u5360\u6BD4", /*#__PURE__*/React.createElement(Tooltip, {
|
|
112
118
|
title: "\u70B9\u51FB\u4EBA\u6570\u5360\u6BD4=\u9875\u9762\u5185\u70B9\u51FB\u4EBA\u6570/\u9875\u9762\u6D4F\u89C8\u4EBA\u6570"
|
|
113
119
|
}, /*#__PURE__*/React.createElement(IconFont, {
|
|
114
120
|
type: "tishi"
|
|
@@ -131,9 +131,9 @@ var DetailContent = function DetailContent(props) {
|
|
|
131
131
|
if (hash) pUrl = pUrl.replace(hash[0], '');
|
|
132
132
|
var secret = 'autoTrack-' + getSocketSecret();
|
|
133
133
|
if (/\?/.test(pageUrl)) {
|
|
134
|
-
url = "".concat(pUrl.replace(/\/$/, ''), "&zgSecret=").concat(secret).concat(hash);
|
|
134
|
+
url = "".concat(pUrl.replace(/\/$/, ''), "&zgSecret=").concat(secret).concat(hash, "&zgAk=").concat(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appKey);
|
|
135
135
|
} else {
|
|
136
|
-
url = "".concat(pUrl.replace(/\/$/, ''), "?zgSecret=").concat(secret).concat(hash);
|
|
136
|
+
url = "".concat(pUrl.replace(/\/$/, ''), "?zgSecret=").concat(secret).concat(hash, "&zgAk=").concat(currentApp === null || currentApp === void 0 ? void 0 : currentApp.appKey);
|
|
137
137
|
}
|
|
138
138
|
return url;
|
|
139
139
|
}, [pageUrl]);
|
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
-
|
|
3
|
-
.detail-content {
|
|
4
|
-
margin-top: 24px;
|
|
5
|
-
border: 1px solid #ecedf0;
|
|
6
|
-
border-radius: 8px;
|
|
7
|
-
|
|
8
|
-
&-top {
|
|
9
|
-
display: flex;
|
|
10
|
-
align-items: flex-start;
|
|
11
|
-
justify-content: space-between;
|
|
12
|
-
padding: 16px;
|
|
13
|
-
background: #fafafb;
|
|
14
|
-
border-radius: 8px 8px 0 0;
|
|
15
|
-
&-title {
|
|
16
|
-
display: flex;
|
|
17
|
-
flex: 1;
|
|
18
|
-
align-items: center;
|
|
19
|
-
}
|
|
20
|
-
&-value {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
max-width: calc(100% - 100px);
|
|
23
|
-
.__default-overflow();
|
|
24
|
-
}
|
|
25
|
-
&-label {
|
|
26
|
-
display: inline-block;
|
|
27
|
-
margin-right: 8px;
|
|
28
|
-
padding: 2px 8px;
|
|
29
|
-
color: #67727f;
|
|
30
|
-
background: #f2f3f4;
|
|
31
|
-
border-radius: 2px;
|
|
32
|
-
}
|
|
33
|
-
&-content {
|
|
34
|
-
flex: none;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&-item {
|
|
38
|
-
display: flex;
|
|
39
|
-
gap: 40px;
|
|
40
|
-
align-items: center;
|
|
41
|
-
color: #67727f;
|
|
42
|
-
.bsicon {
|
|
43
|
-
margin-left: 8px;
|
|
44
|
-
color: #9aa1a9;
|
|
45
|
-
font-size: 16px !important;
|
|
46
|
-
cursor: pointer;
|
|
47
|
-
&:hover {
|
|
48
|
-
color: @primary-color;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
&-content {
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
min-height: 422px;
|
|
58
|
-
padding: 16px;
|
|
59
|
-
&-img {
|
|
60
|
-
text-align: right;
|
|
61
|
-
img {
|
|
62
|
-
height: 22px;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
&-panel {
|
|
66
|
-
display: flex;
|
|
67
|
-
flex: 1;
|
|
68
|
-
flex-direction: column;
|
|
69
|
-
align-items: center;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
img {
|
|
72
|
-
width: 348px;
|
|
73
|
-
}
|
|
74
|
-
.bsicon {
|
|
75
|
-
margin-right: 8px;
|
|
76
|
-
margin-left: 4px;
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
@import '~@zgfe/business-lib/es/assets/styles/inner.less';
|
|
2
|
+
|
|
3
|
+
.detail-content {
|
|
4
|
+
margin-top: 24px;
|
|
5
|
+
border: 1px solid #ecedf0;
|
|
6
|
+
border-radius: 8px;
|
|
7
|
+
|
|
8
|
+
&-top {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
justify-content: space-between;
|
|
12
|
+
padding: 16px;
|
|
13
|
+
background: #fafafb;
|
|
14
|
+
border-radius: 8px 8px 0 0;
|
|
15
|
+
&-title {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex: 1;
|
|
18
|
+
align-items: center;
|
|
19
|
+
}
|
|
20
|
+
&-value {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
max-width: calc(100% - 100px);
|
|
23
|
+
.__default-overflow();
|
|
24
|
+
}
|
|
25
|
+
&-label {
|
|
26
|
+
display: inline-block;
|
|
27
|
+
margin-right: 8px;
|
|
28
|
+
padding: 2px 8px;
|
|
29
|
+
color: #67727f;
|
|
30
|
+
background: #f2f3f4;
|
|
31
|
+
border-radius: 2px;
|
|
32
|
+
}
|
|
33
|
+
&-content {
|
|
34
|
+
flex: none;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&-item {
|
|
38
|
+
display: flex;
|
|
39
|
+
gap: 40px;
|
|
40
|
+
align-items: center;
|
|
41
|
+
color: #67727f;
|
|
42
|
+
.bsicon {
|
|
43
|
+
margin-left: 8px;
|
|
44
|
+
color: #9aa1a9;
|
|
45
|
+
font-size: 16px !important;
|
|
46
|
+
cursor: pointer;
|
|
47
|
+
&:hover {
|
|
48
|
+
color: @primary-color;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&-content {
|
|
55
|
+
display: flex;
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
min-height: 422px;
|
|
58
|
+
padding: 16px;
|
|
59
|
+
&-img {
|
|
60
|
+
text-align: right;
|
|
61
|
+
img {
|
|
62
|
+
height: 22px;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
&-panel {
|
|
66
|
+
display: flex;
|
|
67
|
+
flex: 1;
|
|
68
|
+
flex-direction: column;
|
|
69
|
+
align-items: center;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
img {
|
|
72
|
+
width: 348px;
|
|
73
|
+
}
|
|
74
|
+
.bsicon {
|
|
75
|
+
margin-right: 8px;
|
|
76
|
+
margin-left: 4px;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -25,7 +25,7 @@ var GroupModal = function GroupModal(props) {
|
|
|
25
25
|
var _useContext = useContext(BizGlobalDataContext),
|
|
26
26
|
currentApp = _useContext.currentApp,
|
|
27
27
|
isDemo = _useContext.isDemo;
|
|
28
|
-
var refForm = useRef();
|
|
28
|
+
var refForm = useRef(null);
|
|
29
29
|
// 是否校验
|
|
30
30
|
var _useState3 = useState(false),
|
|
31
31
|
_useState4 = _slicedToArray(_useState3, 2),
|