@vortex-ui/env-puzzle 2.0.0-beta.7 → 2.0.0-beta.9

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.
Files changed (45) hide show
  1. package/README.md +46 -46
  2. package/lib/b-map/js/marker-clusterer.js +181 -181
  3. package/lib/b-map/js/marker-clusterer.js.map +1 -1
  4. package/lib/b-map/style/index.less +10 -10
  5. package/lib/create-modal/create-modal.js +1 -1
  6. package/lib/create-modal/create-modal.js.map +1 -1
  7. package/lib/create-modal/style/index.less +119 -122
  8. package/lib/global.less +6 -11
  9. package/lib/import-modal/style/index.less +15 -15
  10. package/lib/percent/style/index.less +41 -41
  11. package/lib/scroll/style/index.less +3 -3
  12. package/lib/scroll-select/style/index.less +7 -7
  13. package/lib/style/color.less +1 -1
  14. package/lib/style/darkGreen.css +88 -0
  15. package/lib/style/darkGreen.less +482 -370
  16. package/lib/template/action.js.map +1 -1
  17. package/lib/template/filter.d.ts +1 -0
  18. package/lib/template/filter.js +10 -7
  19. package/lib/template/filter.js.map +1 -1
  20. package/lib/template/renderColumnButtons.js +2 -2
  21. package/lib/template/renderColumnButtons.js.map +1 -1
  22. package/lib/template/style/action.less +71 -71
  23. package/lib/template/style/card.less +88 -88
  24. package/lib/template/style/check-row.less +27 -27
  25. package/lib/template/style/field.less +11 -11
  26. package/lib/template/style/filter.css +29 -0
  27. package/lib/template/style/filter.less +72 -46
  28. package/lib/template/style/icon.less +7 -7
  29. package/lib/template/style/index.css +31 -2
  30. package/lib/template/style/index.less +49 -49
  31. package/lib/template/style/table.css +2 -2
  32. package/lib/template/style/table.less +91 -84
  33. package/lib/template/table.js +6 -2
  34. package/lib/template/table.js.map +1 -1
  35. package/lib/template/template.d.ts +1 -1
  36. package/lib/template/template.js +73 -27
  37. package/lib/template/template.js.map +1 -1
  38. package/lib/template/vtx-search/index.d.ts +2 -0
  39. package/lib/template/vtx-search/index.js +126 -0
  40. package/lib/template/vtx-search/index.js.map +1 -0
  41. package/lib/template/vtx-search/style/index.css +92 -0
  42. package/lib/template/vtx-search/style/index.less +92 -0
  43. package/lib/to-map/style/index.less +86 -86
  44. package/lib/view-modal/style/index.less +57 -57
  45. package/package.json +143 -143
@@ -1,27 +1,27 @@
1
- @prefix-cls: env-template;
2
- .@{prefix-cls}-check-row {
3
- display: flex;
4
- align-items: center;
5
- margin-top: 16px;
6
- padding: 10px 12px;
7
- background: rgba(24, 144, 255, 0.1);
8
- border-radius: 4px;
9
- border: 1px solid #1890ff;
10
-
11
- &.is-hide {
12
- display: none;
13
- }
14
-
15
- &-blue {
16
- color: #1890ff;
17
- }
18
-
19
- &-value {
20
- margin: 0 34px 0 12px;
21
- }
22
-
23
- &-clear {
24
- cursor: pointer;
25
- font-weight: 400;
26
- }
27
- }
1
+ @prefix-cls: env-template;
2
+ .@{prefix-cls}-check-row {
3
+ display: flex;
4
+ align-items: center;
5
+ margin-top: 16px;
6
+ padding: 10px 12px;
7
+ background: rgba(24, 144, 255, 0.1);
8
+ border-radius: 4px;
9
+ border: 1px solid #1890ff;
10
+
11
+ &.is-hide {
12
+ display: none;
13
+ }
14
+
15
+ &-blue {
16
+ color: #1890ff;
17
+ }
18
+
19
+ &-value {
20
+ margin: 0 34px 0 12px;
21
+ }
22
+
23
+ &-clear {
24
+ cursor: pointer;
25
+ font-weight: 400;
26
+ }
27
+ }
@@ -1,11 +1,11 @@
1
- @prefix-cls: env-template;
2
- .@{prefix-cls}-card-field {
3
- font-size: 12px;
4
- display: flex;
5
- justify-content: space-between;
6
- color: #6f8191;
7
-
8
- & + & {
9
- margin-top: 12px;
10
- }
11
- }
1
+ @prefix-cls: env-template;
2
+ .@{prefix-cls}-card-field {
3
+ font-size: 12px;
4
+ display: flex;
5
+ justify-content: space-between;
6
+ color: #6f8191;
7
+
8
+ & + & {
9
+ margin-top: 12px;
10
+ }
11
+ }
@@ -45,3 +45,32 @@
45
45
  -ms-transform: rotate(180deg);
46
46
  transform: rotate(180deg);
47
47
  }
48
+ .env-template-search {
49
+ position: relative;
50
+ z-index: 9;
51
+ padding-top: 8px;
52
+ padding-right: 16px;
53
+ padding-bottom: 16px;
54
+ padding-left: 0;
55
+ overflow: hidden;
56
+ background: #fff;
57
+ -webkit-transition-duration: 0.3s;
58
+ transition-duration: 0.3s;
59
+ -webkit-transition-property: height;
60
+ transition-property: height;
61
+ }
62
+ .env-template-search .env-template-lists {
63
+ position: relative;
64
+ display: inline-block;
65
+ -webkit-box-sizing: border-box;
66
+ box-sizing: border-box;
67
+ height: 48px;
68
+ padding-top: 8px;
69
+ padding-bottom: 8px;
70
+ padding-right: 8px;
71
+ line-height: 1.5715;
72
+ vertical-align: top;
73
+ }
74
+ .env-template-search .env-template-lists .env-template-lists-item {
75
+ width: 220px;
76
+ }
@@ -1,46 +1,72 @@
1
- .env-template-filter {
2
- & &-col {
3
- display: flex;
4
- align-items: center;
5
-
6
- &.is-hide {
7
- display: none;
8
- }
9
- .ant-form-item-label {
10
- & > label {
11
- display: flex;
12
- justify-content: flex-end;
13
- }
14
- }
15
- &-label {
16
- overflow: hidden;
17
- white-space: nowrap;
18
- text-overflow: ellipsis;
19
- }
20
- }
21
-
22
- &-form-item {
23
- width: 100%;
24
- margin-bottom: 12px;
25
- }
26
-
27
- &-actions {
28
- text-align: right;
29
- padding-bottom: 12px;
30
- .ant-btn + .ant-btn {
31
- margin-left: 8px;
32
- }
33
- }
34
-
35
- &-btn-pack {
36
- padding: 0;
37
- }
38
-
39
- & &-btn-fold {
40
- transition: all 0.3s;
41
-
42
- &.is-fold {
43
- transform: rotate(180deg);
44
- }
45
- }
46
- }
1
+ .env-template-filter {
2
+ & &-col {
3
+ display: flex;
4
+ align-items: center;
5
+
6
+ &.is-hide {
7
+ display: none;
8
+ }
9
+ .ant-form-item-label {
10
+ & > label {
11
+ display: flex;
12
+ justify-content: flex-end;
13
+ }
14
+ }
15
+ &-label {
16
+ overflow: hidden;
17
+ white-space: nowrap;
18
+ text-overflow: ellipsis;
19
+ }
20
+ }
21
+
22
+ &-form-item {
23
+ width: 100%;
24
+ margin-bottom: 12px;
25
+ }
26
+
27
+ &-actions {
28
+ text-align: right;
29
+ padding-bottom: 12px;
30
+ .ant-btn + .ant-btn {
31
+ margin-left: 8px;
32
+ }
33
+ }
34
+
35
+ &-btn-pack {
36
+ padding: 0;
37
+ }
38
+
39
+ & &-btn-fold {
40
+ transition: all 0.3s;
41
+
42
+ &.is-fold {
43
+ transform: rotate(180deg);
44
+ }
45
+ }
46
+ }
47
+ .env-template-search {
48
+ position: relative;
49
+ z-index: 9;
50
+ padding-top: 8px;
51
+ padding-right: 16px;
52
+ padding-bottom: 16px;
53
+ padding-left: 0;
54
+ overflow: hidden;
55
+ background: #fff;
56
+ transition-duration: 0.3s;
57
+ transition-property: height;
58
+ .env-template-lists {
59
+ position: relative;
60
+ display: inline-block;
61
+ box-sizing: border-box;
62
+ height: 48px;
63
+ padding-top: 8px;
64
+ padding-bottom: 8px;
65
+ padding-right: 8px;
66
+ line-height: 1.5715;
67
+ vertical-align: top;
68
+ .env-template-lists-item {
69
+ width: 220px;
70
+ }
71
+ }
72
+ }
@@ -1,7 +1,7 @@
1
- .env-template-icon {
2
- width: 1em;
3
- height: 1em;
4
- vertical-align: -0.15em;
5
- fill: currentColor;
6
- overflow: hidden;
7
- }
1
+ .env-template-icon {
2
+ width: 1em;
3
+ height: 1em;
4
+ vertical-align: -0.15em;
5
+ fill: currentColor;
6
+ overflow: hidden;
7
+ }
@@ -45,10 +45,39 @@
45
45
  -ms-transform: rotate(180deg);
46
46
  transform: rotate(180deg);
47
47
  }
48
- .env-template .ant-pagination-item-active {
48
+ .env-template-search {
49
+ position: relative;
50
+ z-index: 9;
51
+ padding-top: 8px;
52
+ padding-right: 16px;
53
+ padding-bottom: 16px;
54
+ padding-left: 0;
55
+ overflow: hidden;
56
+ background: #fff;
57
+ -webkit-transition-duration: 0.3s;
58
+ transition-duration: 0.3s;
59
+ -webkit-transition-property: height;
60
+ transition-property: height;
61
+ }
62
+ .env-template-search .env-template-lists {
63
+ position: relative;
64
+ display: inline-block;
65
+ -webkit-box-sizing: border-box;
66
+ box-sizing: border-box;
67
+ height: 48px;
68
+ padding-top: 8px;
69
+ padding-bottom: 8px;
70
+ padding-right: 8px;
71
+ line-height: 1.5715;
72
+ vertical-align: top;
73
+ }
74
+ .env-template-search .env-template-lists .env-template-lists-item {
75
+ width: 220px;
76
+ }
77
+ .env-template .ant-table-pagination.ant-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item-active {
49
78
  background: #1890ff;
50
79
  }
51
- .env-template .ant-pagination-item-active a {
80
+ .env-template .ant-table-pagination.ant-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item-active a {
52
81
  color: #fff;
53
82
  }
54
83
  .env-template-table-wrap {
@@ -1,49 +1,49 @@
1
- @import (reference) '~antd/lib/style/themes/index.less';
2
-
3
- @prefix-cls: env-template;
4
- @import './filter.less';
5
- @import './table.less';
6
- @import './action.less';
7
- @import './check-row.less';
8
- @import './icon.less';
9
- @import './card.less';
10
- @import './field.less';
11
-
12
- .@{prefix-cls} {
13
- background-color: @layout-body-background;
14
- height: 100vh;
15
- display: flex;
16
- flex-direction: column;
17
- position: relative;
18
- > .ant-spin {
19
- position: absolute;
20
- width: 100%;
21
- height: 100%;
22
- top: 0;
23
- left: 0;
24
- z-index: 9999;
25
- background: #00000062;
26
- display: flex;
27
- align-items: center;
28
- justify-content: center;
29
- color: #fff;
30
- flex-direction: column;
31
- line-height: 3;
32
- .ant-spin-dot-item {
33
- background: #fff;
34
- }
35
- }
36
- &__search {
37
- padding: 24px;
38
- background: @component-background;
39
- }
40
- &__table {
41
- flex: 1;
42
- overflow: hidden;
43
- margin-top: 16px;
44
-
45
- .env-template-table-wrap {
46
- background: @component-background;
47
- }
48
- }
49
- }
1
+ @import (reference) '~antd/lib/style/themes/index.less';
2
+
3
+ @prefix-cls: env-template;
4
+ @import './filter.less';
5
+ @import './table.less';
6
+ @import './action.less';
7
+ @import './check-row.less';
8
+ @import './icon.less';
9
+ @import './card.less';
10
+ @import './field.less';
11
+
12
+ .@{prefix-cls} {
13
+ background-color: @layout-body-background;
14
+ height: 100vh;
15
+ display: flex;
16
+ flex-direction: column;
17
+ position: relative;
18
+ > .ant-spin {
19
+ position: absolute;
20
+ width: 100%;
21
+ height: 100%;
22
+ top: 0;
23
+ left: 0;
24
+ z-index: 9999;
25
+ background: #00000062;
26
+ display: flex;
27
+ align-items: center;
28
+ justify-content: center;
29
+ color: #fff;
30
+ flex-direction: column;
31
+ line-height: 3;
32
+ .ant-spin-dot-item {
33
+ background: #fff;
34
+ }
35
+ }
36
+ &__search {
37
+ padding: 24px;
38
+ background: @component-background;
39
+ }
40
+ &__table {
41
+ flex: 1;
42
+ overflow: hidden;
43
+ margin-top: 16px;
44
+
45
+ .env-template-table-wrap {
46
+ background: @component-background;
47
+ }
48
+ }
49
+ }
@@ -1,7 +1,7 @@
1
- .env-template .ant-pagination-item-active {
1
+ .env-template .ant-table-pagination.ant-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item-active {
2
2
  background: #1890ff;
3
3
  }
4
- .env-template .ant-pagination-item-active a {
4
+ .env-template .ant-table-pagination.ant-pagination.ant-pagination-mini .ant-pagination-item.ant-pagination-item-active a {
5
5
  color: #fff;
6
6
  }
7
7
  .env-template-table-wrap {
@@ -1,84 +1,91 @@
1
- @import (reference) '~antd/lib/style/themes/index.less';
2
-
3
- @prefix-cls: env-template;
4
- .@{prefix-cls} {
5
- .ant-pagination-item-active {
6
- background: @primary-color;
7
- a {
8
- color: #fff;
9
- }
10
- }
11
- }
12
-
13
- .@{prefix-cls}-table-wrap {
14
- height: 100%;
15
- display: flex;
16
- flex-direction: column;
17
- }
18
-
19
- .@{prefix-cls}-card-wrap {
20
- flex: 1;
21
- height: 0;
22
- overflow: auto;
23
- &::-webkit-scrollbar {
24
- width: 5px;
25
- background-color: hsla(0, 0%, 80%, 0.08);
26
- }
27
- &::-webkit-scrollbar-thumb {
28
- background-color: rgba(0, 0, 0, 0.05);
29
- border-radius: 3px;
30
- }
31
- .@{prefix-cls}-card-list-empty {
32
- margin-top: 200px;
33
- }
34
- }
35
-
36
- .@{prefix-cls}-card-list {
37
- display: flex;
38
- flex-wrap: wrap;
39
- list-style: none;
40
- padding: 0;
41
- }
42
-
43
- .@{prefix-cls}-card-item {
44
- width: 20%;
45
- }
46
-
47
- .@{prefix-cls}-card-container {
48
- margin: 30px 24px;
49
- }
50
-
51
- .@{prefix-cls}-table {
52
- flex: 1;
53
- &-action-btn {
54
- padding: 0;
55
- > span + .anticon-down {
56
- margin-left: 0;
57
- }
58
- }
59
- &-action-btn + &-action-btn {
60
- // margin-left: 8px;
61
- }
62
- &-action-popover {
63
- .ant-popover-inner-content {
64
- padding: 0;
65
- }
66
- .ant-list-item {
67
- padding: 6px 28px;
68
- cursor: pointer;
69
- }
70
- }
71
- &-pagination {
72
- display: flex;
73
- justify-content: flex-end;
74
- align-items: center;
75
- padding: 16px 0 8px 0;
76
- height: 32px;
77
- box-sizing: content-box;
78
- }
79
- &-total-number {
80
- font-weight: 400;
81
- color: #5f5f5f;
82
- }
83
- }
84
-
1
+ @import (reference) '~antd/lib/style/themes/index.less';
2
+
3
+ @prefix-cls: env-template;
4
+ .@{prefix-cls} {
5
+ .ant-table-pagination {
6
+ &.ant-pagination {
7
+ &.ant-pagination-mini {
8
+ .ant-pagination-item {
9
+ &.ant-pagination-item-active {
10
+ background: @primary-color;
11
+ a {
12
+ color: #fff;
13
+ }
14
+ }
15
+ }
16
+ }
17
+ }
18
+ }
19
+ }
20
+
21
+ .@{prefix-cls}-table-wrap {
22
+ height: 100%;
23
+ display: flex;
24
+ flex-direction: column;
25
+ }
26
+
27
+ .@{prefix-cls}-card-wrap {
28
+ flex: 1;
29
+ height: 0;
30
+ overflow: auto;
31
+ &::-webkit-scrollbar {
32
+ width: 5px;
33
+ background-color: hsla(0, 0%, 80%, 0.08);
34
+ }
35
+ &::-webkit-scrollbar-thumb {
36
+ background-color: rgba(0, 0, 0, 0.05);
37
+ border-radius: 3px;
38
+ }
39
+ .@{prefix-cls}-card-list-empty {
40
+ margin-top: 200px;
41
+ }
42
+ }
43
+
44
+ .@{prefix-cls}-card-list {
45
+ display: flex;
46
+ flex-wrap: wrap;
47
+ list-style: none;
48
+ padding: 0;
49
+ }
50
+
51
+ .@{prefix-cls}-card-item {
52
+ width: 20%;
53
+ }
54
+
55
+ .@{prefix-cls}-card-container {
56
+ margin: 30px 24px;
57
+ }
58
+
59
+ .@{prefix-cls}-table {
60
+ flex: 1;
61
+ &-action-btn {
62
+ padding: 0;
63
+ > span + .anticon-down {
64
+ margin-left: 0;
65
+ }
66
+ }
67
+ &-action-btn + &-action-btn {
68
+ // margin-left: 8px;
69
+ }
70
+ &-action-popover {
71
+ .ant-popover-inner-content {
72
+ padding: 0;
73
+ }
74
+ .ant-list-item {
75
+ padding: 6px 28px;
76
+ cursor: pointer;
77
+ }
78
+ }
79
+ &-pagination {
80
+ display: flex;
81
+ justify-content: flex-end;
82
+ align-items: center;
83
+ padding: 16px 0 8px 0;
84
+ height: 32px;
85
+ box-sizing: content-box;
86
+ }
87
+ &-total-number {
88
+ font-weight: 400;
89
+ color: #5f5f5f;
90
+ }
91
+ }
@@ -93,8 +93,12 @@ function Table(props) {
93
93
  var _a;
94
94
 
95
95
  (_a = rest === null || rest === void 0 ? void 0 : rest.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange([], []);
96
- }
97
- }, rest)));
96
+ },
97
+ refreshIconVisible: false,
98
+ hideColumnHeight: true
99
+ }, rest, {
100
+ hideColumnSetting: true
101
+ })));
98
102
  }
99
103
 
100
104
  var _default = Table;
@@ -1 +1 @@
1
- {"version":3,"file":"table.js","names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","Table","props","className","dataSource","columns","loading","hasIndex","saveColumns","rest","forEach","item","renderButtons","renderButtonsVisibleNum","showTitle","title","render","text","record","index","renderColumnButtons","showAllButtons","undefined","React","createElement","Fragment","VtxDatagrid","assign","indexColumn","defaultVisibleColumnKeys","filter","isShow","map","dataIndex","disabledColumnKeys","classnames","onColumnsSave","keys","newColumns","key","includes","rowSelection","onRowSelectionClear","_a","onChange","defaultProps"],"sources":["template/table.js"],"sourcesContent":["var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport VtxDatagrid from '@vtx/components/lib/vtx-datagrid';\n// import VtxDatagrid from '../vtx-datagrid';\nimport renderColumnButtons from './renderColumnButtons';\nfunction Table(props) {\n const { className, dataSource, columns, loading, hasIndex, saveColumns } = props, rest = __rest(props, [\"className\", \"dataSource\", \"columns\", \"loading\", \"hasIndex\", \"saveColumns\"]);\n // 设置 renderButtons\n columns === null || columns === void 0 ? void 0 : columns.forEach((item) => {\n const { renderButtons, renderButtonsVisibleNum, showTitle } = item;\n if (showTitle) {\n item.title = showTitle;\n }\n if (!renderButtons) {\n return;\n }\n item.render = (text, record, index) => {\n return renderColumnButtons(renderButtons, !item.showAllButtons\n && typeof item.renderButtonsVisibleNum !== 'number'\n ? 3\n : renderButtonsVisibleNum, text, record, index, item.showAllButtons);\n };\n item.renderButtons = undefined;\n });\n return (React.createElement(React.Fragment, null,\n React.createElement(VtxDatagrid, Object.assign({ loading: loading, indexColumn: hasIndex, defaultVisibleColumnKeys: columns === null || columns === void 0 ? void 0 : columns.filter((item) => item.isShow || item.isShow === undefined).map((item) => item.dataIndex), disabledColumnKeys: columns === null || columns === void 0 ? void 0 : columns.filter((item) => item.dataIndex === 'action').map((item) => item.dataIndex), columns: columns, dataSource: dataSource, className: classnames(className, 'env-template-table'), onColumnsSave: saveColumns\n ? (keys) => {\n const newColumns = columns.map((item) => {\n const key = item.dataIndex || item.key;\n return Object.assign(Object.assign({}, item), { isShow: keys.includes(key) });\n });\n saveColumns(newColumns);\n }\n : undefined, rowSelection: rest === null || rest === void 0 ? void 0 : rest.rowSelection, onRowSelectionClear: () => {\n var _a;\n (_a = rest === null || rest === void 0 ? void 0 : rest.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange([], []);\n } }, rest))));\n}\nexport default Table;\nTable.defaultProps = {};\n"],"mappings":";;;;;;;;;AAWA;;AACA;;AACA;;AAEA;;;;;;;;AAfA,IAAIA,MAAM,GAAI,UAAQ,SAAKA,MAAd,IAAyB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;EAClD,IAAIC,CAAC,GAAG,EAAR;;EACA,KAAK,IAAIC,CAAT,IAAcH,CAAd;IAAiB,IAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EACbD,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;EADJ;;EAEA,IAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EACI,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE,EAAwE;IACpE,IAAIT,CAAC,CAACO,OAAF,CAAUL,CAAC,CAACO,CAAD,CAAX,IAAkB,CAAlB,IAAuBN,MAAM,CAACC,SAAP,CAAiBO,oBAAjB,CAAsCL,IAAtC,CAA2CP,CAA3C,EAA8CG,CAAC,CAACO,CAAD,CAA/C,CAA3B,EACIR,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C2B,GAAR,CAAY,UAACrB,IAAD,EAAU;QACrC,IAAM4B,GAAG,GAAG5B,IAAI,CAACsB,SAAL,IAAkBtB,IAAI,CAAC4B,GAAnC;QACA,OAAO/C,MAAM,CAACmC,MAAP,CAAcnC,MAAM,CAACmC,MAAP,CAAc,EAAd,EAAkBhB,IAAlB,CAAd,EAAuC;UAAEoB,MAAM,EAAEM,IAAI,CAACG,QAAL,CAAcD,GAAd;QAAV,CAAvC,CAAP;MACH,CAHkB,CAAnB;MAIA/B,WAAW,CAAC8B,UAAD,CAAX;IACH,CAPshB,GAQrhBhB,SARqC;IAQ1BmB,YAAY,EAAEhC,IAAI,KAAK,IAAT,IAAiBA,IAAI,KAAK,KAAK,CAA/B,GAAmC,KAAK,CAAxC,GAA4CA,IAAI,CAACgC,YARrC;IAQmDC,mBAAmB,EAAE,+BAAM;MACrH,IAAIC,EAAJ;;MACA,CAACA,EAAE,GAAGlC,IAAI,KAAK,IAAT,IAAiBA,IAAI,KAAK,KAAK,CAA/B,GAAmC,KAAK,CAAxC,GAA4CA,IAAI,CAACgC,YAAvD,MAAyE,IAAzE,IAAiFE,EAAE,KAAK,KAAK,CAA7F,GAAiG,KAAK,CAAtG,GAA0GA,EAAE,CAACC,QAAH,CAAY,EAAZ,EAAgB,EAAhB,CAA1G;IACH;EAX0C,CAAd,EAWxBnC,IAXwB,CAAjC,CADI,CAAR;AAaH;;eACcR,K;;AACfA,KAAK,CAAC4C,YAAN,GAAqB,EAArB"}
1
+ {"version":3,"file":"table.js","names":["__rest","s","e","t","p","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","i","length","propertyIsEnumerable","Table","props","className","dataSource","columns","loading","hasIndex","saveColumns","rest","forEach","item","renderButtons","renderButtonsVisibleNum","showTitle","title","render","text","record","index","renderColumnButtons","showAllButtons","undefined","React","createElement","Fragment","VtxDatagrid","assign","indexColumn","defaultVisibleColumnKeys","filter","isShow","map","dataIndex","disabledColumnKeys","classnames","onColumnsSave","keys","newColumns","key","includes","rowSelection","onRowSelectionClear","_a","onChange","refreshIconVisible","hideColumnHeight","hideColumnSetting","defaultProps"],"sources":["template/table.js"],"sourcesContent":["var __rest = (this && this.__rest) || function (s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n};\nimport * as React from 'react';\nimport classnames from 'classnames';\nimport VtxDatagrid from '@vtx/components/lib/vtx-datagrid';\n// import VtxDatagrid from '../vtx-datagrid';\nimport renderColumnButtons from './renderColumnButtons';\nfunction Table(props) {\n const { className, dataSource, columns, loading, hasIndex, saveColumns } = props, rest = __rest(props, [\"className\", \"dataSource\", \"columns\", \"loading\", \"hasIndex\", \"saveColumns\"]);\n // 设置 renderButtons\n columns === null || columns === void 0 ? void 0 : columns.forEach((item) => {\n const { renderButtons, renderButtonsVisibleNum, showTitle } = item;\n if (showTitle) {\n item.title = showTitle;\n }\n if (!renderButtons) {\n return;\n }\n item.render = (text, record, index) => {\n return renderColumnButtons(renderButtons, !item.showAllButtons\n && typeof item.renderButtonsVisibleNum !== 'number'\n ? 3\n : renderButtonsVisibleNum, text, record, index, item.showAllButtons);\n };\n item.renderButtons = undefined;\n });\n return (React.createElement(React.Fragment, null,\n React.createElement(VtxDatagrid, Object.assign({ loading: loading, indexColumn: hasIndex, defaultVisibleColumnKeys: columns === null || columns === void 0 ? void 0 : columns.filter((item) => item.isShow || item.isShow === undefined).map((item) => item.dataIndex), disabledColumnKeys: columns === null || columns === void 0 ? void 0 : columns.filter((item) => item.dataIndex === 'action').map((item) => item.dataIndex), columns: columns, dataSource: dataSource, className: classnames(className, 'env-template-table'), onColumnsSave: saveColumns\n ? (keys) => {\n const newColumns = columns.map((item) => {\n const key = item.dataIndex || item.key;\n return Object.assign(Object.assign({}, item), { isShow: keys.includes(key) });\n });\n saveColumns(newColumns);\n }\n : undefined, rowSelection: rest === null || rest === void 0 ? void 0 : rest.rowSelection, onRowSelectionClear: () => {\n var _a;\n (_a = rest === null || rest === void 0 ? void 0 : rest.rowSelection) === null || _a === void 0 ? void 0 : _a.onChange([], []);\n }, refreshIconVisible: false, hideColumnHeight: true }, rest, { hideColumnSetting: true }))));\n}\nexport default Table;\nTable.defaultProps = {};\n"],"mappings":";;;;;;;;;AAWA;;AACA;;AACA;;AAEA;;;;;;;;AAfA,IAAIA,MAAM,GAAI,UAAQ,SAAKA,MAAd,IAAyB,UAAUC,CAAV,EAAaC,CAAb,EAAgB;EAClD,IAAIC,CAAC,GAAG,EAAR;;EACA,KAAK,IAAIC,CAAT,IAAcH,CAAd;IAAiB,IAAII,MAAM,CAACC,SAAP,CAAiBC,cAAjB,CAAgCC,IAAhC,CAAqCP,CAArC,EAAwCG,CAAxC,KAA8CF,CAAC,CAACO,OAAF,CAAUL,CAAV,IAAe,CAAjE,EACbD,CAAC,CAACC,CAAD,CAAD,GAAOH,CAAC,CAACG,CAAD,CAAR;EADJ;;EAEA,IAAIH,CAAC,IAAI,IAAL,IAAa,OAAOI,MAAM,CAACK,qBAAd,KAAwC,UAAzD,EACI,KAAK,IAAIC,CAAC,GAAG,CAAR,EAAWP,CAAC,GAAGC,MAAM,CAACK,qBAAP,CAA6BT,CAA7B,CAApB,EAAqDU,CAAC,GAAGP,CAAC,CAACQ,MAA3D,EAAmED,CAAC,EAApE,EAAwE;IACpE,IAAIT,CAAC,CAACO,OAAF,CAAUL,CAAC,CAACO,CAAD,CAAX,IAAkB,CAAlB,IAAuBN,MAAM,CAACC,SAAP,CAAiBO,oBAAjB,CAAsCL,IAAtC,CAA2CP,CAA3C,EAA8CG,CAAC,CAACO,CAAD,CAA/C,CAA3B,EACIR,CAAC,CAACC,CAAC,CAACO,CAAD,CAAF,CAAD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,IAAM4B,GAAG,GAAG5B,IAAI,CAACsB,SAAL,IAAkBtB,IAAI,CAAC4B,GAAnC;QACA,OAAO/C,MAAM,CAACmC,MAAP,CAAcnC,MAAM,CAACmC,MAAP,CAAc,EAAd,EAAkBhB,IAAlB,CAAd,EAAuC;UAAEoB,MAAM,EAAEM,IAAI,CAACG,QAAL,CAAcD,GAAd;QAAV,CAAvC,CAAP;MACH,CAHkB,CAAnB;MAIA/B,WAAW,CAAC8B,UAAD,CAAX;IACH,CAPshB,GAQrhBhB,SARqC;IAQ1BmB,YAAY,EAAEhC,IAAI,KAAK,IAAT,IAAiBA,IAAI,KAAK,KAAK,CAA/B,GAAmC,KAAK,CAAxC,GAA4CA,IAAI,CAACgC,YARrC;IAQmDC,mBAAmB,EAAE,+BAAM;MACrH,IAAIC,EAAJ;;MACA,CAACA,EAAE,GAAGlC,IAAI,KAAK,IAAT,IAAiBA,IAAI,KAAK,KAAK,CAA/B,GAAmC,KAAK,CAAxC,GAA4CA,IAAI,CAACgC,YAAvD,MAAyE,IAAzE,IAAiFE,EAAE,KAAK,KAAK,CAA7F,GAAiG,KAAK,CAAtG,GAA0GA,EAAE,CAACC,QAAH,CAAY,EAAZ,EAAgB,EAAhB,CAA1G;IACH,CAX0C;IAWxCC,kBAAkB,EAAE,KAXoB;IAWbC,gBAAgB,EAAE;EAXL,CAAd,EAW2BrC,IAX3B,EAWiC;IAAEsC,iBAAiB,EAAE;EAArB,CAXjC,CAAjC,CADI,CAAR;AAaH;;eACc9C,K;;AACfA,KAAK,CAAC+C,YAAN,GAAqB,EAArB"}
@@ -16,7 +16,7 @@ export interface TemplatePagination extends TablePaginationConfig {
16
16
  }
17
17
  export interface TemplateProps<F, T> {
18
18
  actionProps?: Omit<ActionProps<F, T>, 'columns' | 'setColumns' | 'selectable' | 'selectRows' | 'filter' | 'dataSource' | 'onSelectedRows'>;
19
- tableProps?: TableProps<T> | React.ReactElement;
19
+ tableProps?: TableProps<T>;
20
20
  statisticsProps?: React.ReactElement;
21
21
  getDataSource: (pagination: TemplatePagination | false, filter: F) => Promise<PageApiRes<T>> | PageApiRes<T>;
22
22
  onReset?: () => any;