@zgfe/modules-page 1.0.8-lijingyu1538.1 → 1.0.17-zhongyuan.3

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 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
+ ```
@@ -1,116 +1,116 @@
1
- @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
-
3
- .page-content {
4
- margin-top: 24px;
5
-
6
- .ant-table
7
- .ant-table-thead
8
- .ant-table-cell.ant-table-column-has-sorters
9
- .ant-table-column-sorters {
10
- justify-content: flex-end;
11
- }
12
- .thread-right .ant-table-column-sorters {
13
- justify-content: flex-end;
14
- }
15
-
16
- .thread-title {
17
- span {
18
- margin-left: 4px;
19
- color: #9aa1a9;
20
- cursor: pointer;
21
- &:hover {
22
- color: @primary-color;
23
- }
24
- }
25
- }
26
- .ant-table .ant-table-container .ant-table-thead > tr > th.thread-merge {
27
- border-bottom: none;
28
- }
29
-
30
- .table-td-page {
31
- position: relative;
32
- cursor: pointer;
33
-
34
- &:hover {
35
- .table-td-page-icon {
36
- display: block;
37
- }
38
- }
39
- &-title {
40
- color: @text-color-secondary;
41
- .__default-overflow();
42
- }
43
- &-content {
44
- margin-top: 8px;
45
- color: #9aa1a9;
46
- font-size: 12px;
47
- .__default-overflow();
48
- }
49
- &-icon {
50
- position: absolute;
51
- top: 8px;
52
- right: 0px;
53
- z-index: 10;
54
- display: none;
55
- font-size: 16px !important;
56
- &:hover {
57
- color: @primary-color;
58
- }
59
- }
60
- }
61
- .table-td-group {
62
- &:hover {
63
- .bsicon {
64
- display: inline-block;
65
- }
66
- }
67
- &-content {
68
- cursor: pointer;
69
- }
70
- .bsicon {
71
- display: none;
72
- margin-left: 16px;
73
- cursor: pointer;
74
-
75
- &:hover {
76
- color: @primary-color;
77
- }
78
- }
79
- }
80
-
81
- &-empty {
82
- display: flex;
83
- align-items: center;
84
- justify-content: center;
85
- margin-top: 24px;
86
- padding: 105px 0;
87
- background: #fff;
88
- border: 1px solid #ecedf0;
89
- border-radius: 8px;
90
-
91
- &-content {
92
- display: flex;
93
- flex-direction: column;
94
- align-items: center;
95
- width: 348px;
96
-
97
- img {
98
- width: 348px;
99
- }
100
- }
101
-
102
- &-content1 {
103
- font-size: 16px;
104
- }
105
- &-content2 {
106
- margin-top: 8px;
107
- margin-bottom: 24px;
108
- color: @text-color-secondary;
109
- font-size: 16px;
110
- text-align: center;
111
- }
112
- .tianjia1 {
113
- margin-right: 8px;
114
- }
115
- }
116
- }
1
+ @import '~@zgfe/business-lib/es/assets/styles/inner.less';
2
+
3
+ .page-content {
4
+ margin-top: 24px;
5
+
6
+ .ant-table
7
+ .ant-table-thead
8
+ .ant-table-cell.ant-table-column-has-sorters
9
+ .ant-table-column-sorters {
10
+ justify-content: flex-end;
11
+ }
12
+ .thread-right .ant-table-column-sorters {
13
+ justify-content: flex-end;
14
+ }
15
+
16
+ .thread-title {
17
+ span {
18
+ margin-left: 4px;
19
+ color: #9aa1a9;
20
+ cursor: pointer;
21
+ &:hover {
22
+ color: @primary-color;
23
+ }
24
+ }
25
+ }
26
+ .ant-table .ant-table-container .ant-table-thead > tr > th.thread-merge {
27
+ border-bottom: none;
28
+ }
29
+
30
+ .table-td-page {
31
+ position: relative;
32
+ cursor: pointer;
33
+
34
+ &:hover {
35
+ .table-td-page-icon {
36
+ display: block;
37
+ }
38
+ }
39
+ &-title {
40
+ color: @text-color-secondary;
41
+ .__default-overflow();
42
+ }
43
+ &-content {
44
+ margin-top: 8px;
45
+ color: #9aa1a9;
46
+ font-size: 12px;
47
+ .__default-overflow();
48
+ }
49
+ &-icon {
50
+ position: absolute;
51
+ top: 8px;
52
+ right: 0px;
53
+ z-index: 10;
54
+ display: none;
55
+ font-size: 16px !important;
56
+ &:hover {
57
+ color: @primary-color;
58
+ }
59
+ }
60
+ }
61
+ .table-td-group {
62
+ &:hover {
63
+ .bsicon {
64
+ display: inline-block;
65
+ }
66
+ }
67
+ &-content {
68
+ cursor: pointer;
69
+ }
70
+ .bsicon {
71
+ display: none;
72
+ margin-left: 16px;
73
+ cursor: pointer;
74
+
75
+ &:hover {
76
+ color: @primary-color;
77
+ }
78
+ }
79
+ }
80
+
81
+ &-empty {
82
+ display: flex;
83
+ align-items: center;
84
+ justify-content: center;
85
+ margin-top: 24px;
86
+ padding: 105px 0;
87
+ background: #fff;
88
+ border: 1px solid #ecedf0;
89
+ border-radius: 8px;
90
+
91
+ &-content {
92
+ display: flex;
93
+ flex-direction: column;
94
+ align-items: center;
95
+ width: 348px;
96
+
97
+ img {
98
+ width: 348px;
99
+ }
100
+ }
101
+
102
+ &-content1 {
103
+ font-size: 16px;
104
+ }
105
+ &-content2 {
106
+ margin-top: 8px;
107
+ margin-bottom: 24px;
108
+ color: @text-color-secondary;
109
+ font-size: 16px;
110
+ text-align: center;
111
+ }
112
+ .tianjia1 {
113
+ margin-right: 8px;
114
+ }
115
+ }
116
+ }
@@ -1,9 +1,7 @@
1
- import { BizGlobalDataContext, IconFont, util } from '@zgfe/business-lib';
1
+ import { IconFont, util } from '@zgfe/business-lib';
2
2
  import { Tooltip } from 'antd';
3
- import React, { useContext } from '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
- (_navigator = navigator) === null || _navigator === void 0 || (_navigator = _navigator.clipboard) === null || _navigator === void 0 || _navigator.writeText(record === null || record === void 0 ? void 0 : record.pageUrl).catch(function () {
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: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体数' : '人数',
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: (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体数' : '人数',
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", (currentApp === null || currentApp === void 0 ? void 0 : currentApp.type) != 'user' ? '主体' : '人', "\u6570\u5360\u6BD4", /*#__PURE__*/React.createElement(Tooltip, {
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),