acud 0.0.65 → 0.0.66

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 (85) hide show
  1. package/dist/acud.css +76 -39
  2. package/dist/acud.css.map +1 -1
  3. package/dist/acud.js +458 -205
  4. package/dist/acud.js.map +1 -1
  5. package/dist/acud.min.css +1 -1
  6. package/dist/acud.min.css.map +1 -1
  7. package/dist/acud.min.js +10 -4
  8. package/dist/acud.min.js.map +1 -1
  9. package/es/breadcrumb/BreadcrumbItem.d.ts +1 -1
  10. package/es/breadcrumb/BreadcrumbItem.js +16 -4
  11. package/es/dialog-box/style/index.css +4 -4
  12. package/es/dropdown/dropdown-button.js +7 -1
  13. package/es/dropdown/style/index.css +2 -1
  14. package/es/dropdown/style/index.less +2 -1
  15. package/es/modal/Modal.d.ts +5 -0
  16. package/es/modal/Modal.js +6 -4
  17. package/es/modal/style/index.css +24 -14
  18. package/es/modal/style/index.less +18 -6
  19. package/es/modal/style/mixin.less +2 -2
  20. package/es/progress/style/common.less +5 -3
  21. package/es/progress/style/index.css +2 -1
  22. package/es/radio/index.d.ts +3 -0
  23. package/es/style/themes/dark/components/modal.less +14 -9
  24. package/es/style/themes/default/components/modal.less +14 -14
  25. package/es/time-picker/style/index.css +1 -0
  26. package/es/time-picker/style/index.less +1 -0
  27. package/es/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  28. package/es/transfer/{dataSource.js → DataSource.js} +37 -6
  29. package/{lib/transfer/sourceList.d.ts → es/transfer/SourceList.d.ts} +2 -2
  30. package/es/transfer/{sourceList.js → SourceList.js} +0 -0
  31. package/es/transfer/{target.d.ts → Target.d.ts} +1 -1
  32. package/es/transfer/{target.js → Target.js} +60 -4
  33. package/{lib/transfer/targetList.d.ts → es/transfer/TargetList.d.ts} +2 -2
  34. package/es/transfer/{targetList.js → TargetList.js} +0 -0
  35. package/es/transfer/index.d.ts +3 -0
  36. package/es/transfer/index.js +9 -4
  37. package/es/transfer/style/css.js +3 -1
  38. package/es/transfer/style/index.css +25 -5
  39. package/es/transfer/style/index.d.ts +1 -0
  40. package/es/transfer/style/index.js +3 -1
  41. package/es/transfer/style/index.less +30 -5
  42. package/es/upload/UploadList/ListItem.js +7 -2
  43. package/es/upload/UploadList/index.js +4 -7
  44. package/es/upload/style/index.css +17 -13
  45. package/es/upload/style/index.less +25 -20
  46. package/es/upload/utils.js +1 -1
  47. package/lib/breadcrumb/BreadcrumbItem.d.ts +1 -1
  48. package/lib/breadcrumb/BreadcrumbItem.js +21 -8
  49. package/lib/dialog-box/style/index.css +4 -4
  50. package/lib/dropdown/dropdown-button.js +7 -1
  51. package/lib/dropdown/style/index.css +2 -1
  52. package/lib/dropdown/style/index.less +2 -1
  53. package/lib/modal/Modal.d.ts +5 -0
  54. package/lib/modal/Modal.js +6 -4
  55. package/lib/modal/style/index.css +24 -14
  56. package/lib/modal/style/index.less +18 -6
  57. package/lib/modal/style/mixin.less +2 -2
  58. package/lib/progress/style/common.less +5 -3
  59. package/lib/progress/style/index.css +2 -1
  60. package/lib/radio/index.d.ts +3 -0
  61. package/lib/style/themes/dark/components/modal.less +14 -9
  62. package/lib/style/themes/default/components/modal.less +14 -14
  63. package/lib/time-picker/style/index.css +1 -0
  64. package/lib/time-picker/style/index.less +1 -0
  65. package/lib/transfer/{dataSource.d.ts → DataSource.d.ts} +1 -1
  66. package/lib/transfer/{dataSource.js → DataSource.js} +38 -6
  67. package/{es/transfer/sourceList.d.ts → lib/transfer/SourceList.d.ts} +2 -2
  68. package/lib/transfer/{sourceList.js → SourceList.js} +0 -0
  69. package/lib/transfer/{target.d.ts → Target.d.ts} +1 -1
  70. package/lib/transfer/{target.js → Target.js} +63 -5
  71. package/{es/transfer/targetList.d.ts → lib/transfer/TargetList.d.ts} +2 -2
  72. package/lib/transfer/{targetList.js → TargetList.js} +0 -0
  73. package/lib/transfer/index.d.ts +3 -0
  74. package/lib/transfer/index.js +11 -7
  75. package/lib/transfer/style/css.js +3 -1
  76. package/lib/transfer/style/index.css +25 -5
  77. package/lib/transfer/style/index.d.ts +1 -0
  78. package/lib/transfer/style/index.js +3 -1
  79. package/lib/transfer/style/index.less +30 -5
  80. package/lib/upload/UploadList/ListItem.js +7 -2
  81. package/lib/upload/UploadList/index.js +4 -7
  82. package/lib/upload/style/index.css +17 -13
  83. package/lib/upload/style/index.less +25 -20
  84. package/lib/upload/utils.js +1 -1
  85. package/package.json +1 -1
@@ -55,25 +55,25 @@
55
55
  -webkit-overflow-scrolling: touch;
56
56
  z-index: 1000;
57
57
  }
58
- .acud-modal-sm {
58
+ .acud-modal-sm > .acud-modal-content {
59
59
  width: 520px;
60
- height: 240px;
61
- max-height: 240px;
60
+ min-height: 240px;
61
+ max-height: 560px;
62
62
  }
63
- .acud-modal-md {
63
+ .acud-modal-md > .acud-modal-content {
64
64
  width: 800px;
65
- height: 400px;
66
- max-height: 400px;
65
+ min-height: 400px;
66
+ max-height: 560px;
67
67
  }
68
- .acud-modal-lg {
68
+ .acud-modal-lg > .acud-modal-content {
69
69
  width: 1120px;
70
- height: 480px;
71
- max-height: 480px;
70
+ min-height: 480px;
71
+ max-height: 560px;
72
72
  }
73
- .acud-modal-xl {
73
+ .acud-modal-xl > .acud-modal-content {
74
74
  width: 1200px;
75
- height: 480px;
76
- max-height: 480px;
75
+ min-height: 480px;
76
+ max-height: 560px;
77
77
  }
78
78
  .acud-modal-content {
79
79
  position: relative;
@@ -126,6 +126,7 @@
126
126
  .acud-modal-title {
127
127
  font-size: 14px;
128
128
  line-height: 22px;
129
+ padding-right: 12px;
129
130
  word-wrap: break-word;
130
131
  }
131
132
  .acud-modal-body {
@@ -165,12 +166,21 @@
165
166
  align-items: center;
166
167
  padding-top: 2px;
167
168
  }
168
- .acud-modal-dialogbox .acud-modal-title .acudicon {
169
- font-size: 20px;
169
+ .acud-modal-dialogbox-title {
170
+ overflow: hidden;
171
+ padding-right: 12px;
170
172
  }
171
173
  .acud-modal-dialogbox-content {
174
+ width: 400px;
172
175
  padding-left: 32px;
173
176
  }
177
+ .acud-modal-dialogbox .acud-modal-title .acudicon {
178
+ font-size: 20px;
179
+ }
180
+ .acud-modal-dialogbox > .acud-modal-content {
181
+ width: 400px;
182
+ min-height: 184px;
183
+ }
174
184
  .acud-modal-dialogbox-warning .acud-modal-dialogbox-icon {
175
185
  color: #FF9326;
176
186
  }
@@ -18,19 +18,19 @@
18
18
  width: auto;
19
19
  max-width: calc(100vw - 32px);
20
20
 
21
- &-sm {
21
+ &-sm > &-content {
22
22
  .modal-size-config(sm);
23
23
  }
24
24
 
25
- &-md {
25
+ &-md > &-content {
26
26
  .modal-size-config(md);
27
27
  }
28
28
 
29
- &-lg {
29
+ &-lg > &-content {
30
30
  .modal-size-config(lg);
31
31
  }
32
32
 
33
- &-xl {
33
+ &-xl > &-content {
34
34
  .modal-size-config(xl);
35
35
  }
36
36
 
@@ -94,6 +94,7 @@
94
94
  &-title {
95
95
  font-size: @modal-heading-font-size;
96
96
  line-height: @modal-heading-height;
97
+ padding-right: @P * 3;
97
98
  word-wrap: break-word;
98
99
  }
99
100
 
@@ -143,14 +144,25 @@
143
144
  padding-top: 2px;
144
145
  }
145
146
 
147
+ &-title {
148
+ overflow: hidden;
149
+ padding-right: @P * 3;
150
+ }
151
+
152
+ &-content {
153
+ width: @P * 100;
154
+ padding-left: @P * 3 + @T6;
155
+ }
156
+
146
157
  .@{modal-prefix-cls}-title {
147
158
  .acudicon {
148
159
  font-size: @T6;
149
160
  }
150
161
  }
151
162
 
152
- &-content {
153
- padding-left: @P * 3 + @T6;
163
+ & > .@{modal-prefix-cls}-content {
164
+ width: @P * 100;
165
+ min-height: @P * 46;
154
166
  }
155
167
  }
156
168
 
@@ -39,9 +39,9 @@
39
39
 
40
40
  .modal-size-config(@type) {
41
41
  @width: ~'modal-width-@{type}';
42
- @height: ~'modal-height-@{type}';
42
+ @min-height: ~'modal-height-@{type}';
43
43
  @max-height: ~'modal-max-height-@{type}';
44
44
  width: @@width;
45
- height: @@height;
45
+ min-height: @@min-height;
46
46
  max-height: @@max-height;
47
47
  }
@@ -29,6 +29,8 @@
29
29
  }
30
30
  }
31
31
 
32
- .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label {
33
- display: none;
34
- }
32
+ .@{progress-prefix-cls}-label-hidden .@{progress-prefix-cls}-label{
33
+ &.@{progress-prefix-cls}-label-outer, &.@{progress-prefix-cls}-label-inner{
34
+ display: none;
35
+ }
36
+ }
@@ -23,7 +23,8 @@
23
23
  .acud-progress-success .acud-progress-label-icon {
24
24
  font-size: 0;
25
25
  }
26
- .acud-progress-label-hidden .acud-progress-label {
26
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-outer,
27
+ .acud-progress-label-hidden .acud-progress-label.acud-progress-label-inner {
27
28
  display: none;
28
29
  }
29
30
  .acud-progress-line {
@@ -1,2 +1,5 @@
1
1
  import Radio from './Radio';
2
+ export { RadioProps } from './Radio';
3
+ export { ContextProps } from './context';
4
+ export { BaseRadioGourpProps } from './RadioGroup';
2
5
  export default Radio;
@@ -10,15 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 100*@P;
14
- @modal-width-md: 150*@P;
15
- @modal-width-lg: 200*@P;
16
- @modal-width-xl: 300*@P;
17
-
18
- @modal-max-height-sm: 160*@P;
19
- @modal-max-height-md: 160*@P;
20
- @modal-max-height-lg: 160*@P;
21
- @modal-max-height-xl: 160*@P;
13
+ @modal-width-sm: 100 * @P;
14
+ @modal-width-md: 150 * @P;
15
+ @modal-width-lg: 200 * @P;
16
+ @modal-width-xl: 300 * @P;
17
+
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
+
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
22
27
 
23
28
  // Content
24
29
  @modal-content-bg-color: @G11;
@@ -10,20 +10,20 @@
10
10
  @modal-mask-color: fade(@G5, 50%);
11
11
 
12
12
  // 默认宽高设置
13
- @modal-width-sm: 130*@P;
14
- @modal-width-md: 200*@P;
15
- @modal-width-lg: 280*@P;
16
- @modal-width-xl: 300*@P;
17
-
18
- @modal-max-height-sm: 60*@P;
19
- @modal-max-height-md: 100*@P;
20
- @modal-max-height-lg: 120*@P;
21
- @modal-max-height-xl: 120*@P;
22
-
23
- @modal-height-sm: 60*@P;
24
- @modal-height-md: 100*@P;
25
- @modal-height-lg: 120*@P;
26
- @modal-height-xl: 120*@P;
13
+ @modal-width-sm: 130 * @P;
14
+ @modal-width-md: 200 * @P;
15
+ @modal-width-lg: 280 * @P;
16
+ @modal-width-xl: 300 * @P;
17
+
18
+ @modal-max-height-sm: 140 * @P;
19
+ @modal-max-height-md: 140 * @P;
20
+ @modal-max-height-lg: 140 * @P;
21
+ @modal-max-height-xl: 140 * @P;
22
+
23
+ @modal-height-sm: 60 * @P;
24
+ @modal-height-md: 100 * @P;
25
+ @modal-height-lg: 120 * @P;
26
+ @modal-height-xl: 120 * @P;
27
27
 
28
28
  // Content
29
29
  @modal-content-bg-color: @G11;
@@ -231,6 +231,7 @@
231
231
  text-align: left;
232
232
  color: #2468F2;
233
233
  cursor: pointer;
234
+ margin-top: 0;
234
235
  }
235
236
  .acud-time-panel-wrap .acud-picker-decade-panel .acud-picker-cell-inner {
236
237
  padding: 0 6px;
@@ -183,6 +183,7 @@
183
183
  text-align: left;
184
184
  color: @picker-time-active-color;
185
185
  cursor: pointer;
186
+ margin-top: 0;
186
187
  }
187
188
  // ===================== Decade Panel =====================
188
189
  &-decade-panel {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TransferItem, TransferProps } from './';
2
+ import { TransferItem, TransferProps } from '.';
3
3
  export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
4
4
  tKeys: string[];
5
5
  setTKeys: (t: string[]) => void;
@@ -21,9 +21,11 @@ var _cloneDeep = _interopRequireDefault(require("lodash/cloneDeep"));
21
21
 
22
22
  var _checkbox = _interopRequireDefault(require("../checkbox"));
23
23
 
24
+ var _table = _interopRequireDefault(require("../table"));
25
+
24
26
  var _search = _interopRequireDefault(require("../search"));
25
27
 
26
- var _sourceList = _interopRequireDefault(require("./sourceList"));
28
+ var _SourceList = _interopRequireDefault(require("./SourceList"));
27
29
 
28
30
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
31
 
@@ -37,13 +39,18 @@ var defaultFilterOption = function defaultFilterOption(inputValue, option) {
37
39
  return option.title.indexOf(inputValue) > -1;
38
40
  };
39
41
 
42
+ var defaultTableFilterOption = function defaultTableFilterOption(inputValue, option) {
43
+ return option.key.indexOf(inputValue) > -1;
44
+ };
45
+
40
46
  function dataSource(props) {
41
47
  var prefixCls = props.prefixCls,
48
+ displayType = props.displayType,
49
+ columns = props.columns,
42
50
  expansionSource = props.expansionSource,
43
51
  _props$showSelectAll = props.showSelectAll,
44
52
  showSelectAll = _props$showSelectAll === void 0 ? true : _props$showSelectAll,
45
- _props$filterOption = props.filterOption,
46
- filterOption = _props$filterOption === void 0 ? defaultFilterOption : _props$filterOption,
53
+ filterOptionProp = props.filterOption,
47
54
  showSearch = props.showSearch,
48
55
  _props$showSearchClea = props.showSearchClear,
49
56
  showSearchClear = _props$showSearchClea === void 0 ? true : _props$showSearchClea,
@@ -51,6 +58,7 @@ function dataSource(props) {
51
58
  setTKeys = props.setTKeys,
52
59
  leftStyle = props.leftStyle,
53
60
  locale = props.locale;
61
+ var filterOption = filterOptionProp || (displayType === 'table' ? defaultTableFilterOption : defaultFilterOption);
54
62
  var dataSourceCls = "".concat(prefixCls, "-datasource");
55
63
  var sourceTitle = locale.sourceTitle,
56
64
  searchPlaceholder = locale.searchPlaceholder,
@@ -100,7 +108,7 @@ function dataSource(props) {
100
108
  }
101
109
  });
102
110
  return fileterCloneSource;
103
- }, [searchValue, expansionSource]);
111
+ }, [searchValue, expansionSource, displayType]);
104
112
  var totalUndisabledKeys = React.useMemo(function () {
105
113
  var unDisabledDataSource = filterSource.filter(function (data) {
106
114
  return !data.group && !data.disabled;
@@ -133,14 +141,31 @@ function dataSource(props) {
133
141
  var searchValue = e.target.value;
134
142
  setSearchValue(searchValue);
135
143
  }, []);
144
+
145
+ var onSelectChange = function onSelectChange(v) {
146
+ // 排除filter中包含的tKeys,记为noneFilterKeys
147
+ // 联合noneFilterKeys与filter中的选择项,记为最终keys
148
+ var noneFilterKeys = tKeys.filter(function (key) {
149
+ return !filterSource.some(function (item) {
150
+ return item.key === key;
151
+ });
152
+ });
153
+ setTKeys([].concat((0, _toConsumableArray2["default"])(noneFilterKeys), (0, _toConsumableArray2["default"])(v)));
154
+ };
155
+
156
+ var rowSelection = {
157
+ onChange: onSelectChange,
158
+ selectedRowKeys: tKeys
159
+ };
136
160
  return /*#__PURE__*/React.createElement("div", {
137
161
  className: dataSourceCls,
138
162
  style: leftStyle
139
163
  }, /*#__PURE__*/React.createElement("div", {
140
164
  className: "".concat(dataSourceCls, "-header")
141
- }, showSelectAll && /*#__PURE__*/React.createElement(_checkbox["default"], {
165
+ }, showSelectAll && displayType === 'single' && /*#__PURE__*/React.createElement(_checkbox["default"], {
142
166
  checked: allChecked,
143
167
  indeterminate: indeterminate,
168
+ className: "".concat(dataSourceCls, "-header-checkall"),
144
169
  onClick: selectAll
145
170
  }), /*#__PURE__*/React.createElement("span", {
146
171
  className: "".concat(dataSourceCls, "-label")
@@ -152,7 +177,14 @@ function dataSource(props) {
152
177
  allowClear: showSearchClear,
153
178
  size: "small",
154
179
  onChange: searchChange
155
- }), !!filterSource.length && /*#__PURE__*/React.createElement(_sourceList["default"], (0, _extends2["default"])({}, props, {
180
+ }), !!filterSource.length && displayType === 'table' && /*#__PURE__*/React.createElement("div", {
181
+ className: "".concat(prefixCls, "-table-box")
182
+ }, /*#__PURE__*/React.createElement(_table["default"], {
183
+ pagination: false,
184
+ dataSource: filterSource,
185
+ columns: columns,
186
+ rowSelection: rowSelection
187
+ })), !!filterSource.length && displayType === 'single' && /*#__PURE__*/React.createElement(_SourceList["default"], (0, _extends2["default"])({}, props, {
156
188
  filterSource: filterSource
157
189
  })), filterSource.length === 0 && /*#__PURE__*/React.createElement("p", {
158
190
  className: "".concat(dataSourceCls, "-nodata")
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { DataSourceProps } from './dataSource';
3
- import { TransferItem } from './';
2
+ import { DataSourceProps } from './DataSource';
3
+ import { TransferItem } from '.';
4
4
  export interface DataSourceListProps<RecordType> extends DataSourceProps<RecordType> {
5
5
  filterSource: RecordType[];
6
6
  }
File without changes
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { TransferItem, TransferProps } from './';
2
+ import { TransferItem, TransferProps } from '.';
3
3
  export interface DataSourceProps<RecordType> extends TransferProps<RecordType> {
4
4
  tKeys: string[];
5
5
  setTKeys: (t: string[]) => void;
@@ -13,13 +13,19 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
13
13
 
14
14
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
15
15
 
16
+ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
+
16
18
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
17
19
 
18
20
  var React = _interopRequireWildcard(require("react"));
19
21
 
20
- var _classnames2 = _interopRequireDefault(require("classnames"));
22
+ var _dedupe = _interopRequireDefault(require("classnames/dedupe"));
23
+
24
+ var _acudIcon = require("acud-icon");
21
25
 
22
- var _targetList = _interopRequireDefault(require("./targetList"));
26
+ var _table = _interopRequireDefault(require("../table"));
27
+
28
+ var _TargetList = _interopRequireDefault(require("./TargetList"));
23
29
 
24
30
  var _search = _interopRequireDefault(require("../search"));
25
31
 
@@ -39,6 +45,7 @@ function target(props) {
39
45
  var _classnames;
40
46
 
41
47
  var prefixCls = props.prefixCls,
48
+ displayType = props.displayType,
42
49
  _props$showClearAll = props.showClearAll,
43
50
  showClearAll = _props$showClearAll === void 0 ? true : _props$showClearAll,
44
51
  _props$filterOption = props.filterOption,
@@ -50,7 +57,8 @@ function target(props) {
50
57
  setTKeys = props.setTKeys,
51
58
  rightStyle = props.rightStyle,
52
59
  locale = props.locale,
53
- expansionSource = props.expansionSource;
60
+ expansionSource = props.expansionSource,
61
+ columns = props.columns;
54
62
  var targetCls = "".concat(prefixCls, "-target");
55
63
  var targetTitle = locale.targetTitle,
56
64
  searchPlaceholder = locale.searchPlaceholder,
@@ -125,7 +133,51 @@ function target(props) {
125
133
  var searchValue = e.target.value;
126
134
  setSearchValue(searchValue);
127
135
  }, []);
128
- var clearCls = (0, _classnames2["default"])((_classnames = {}, (0, _defineProperty2["default"])(_classnames, "".concat(targetCls, "-clear-all"), true), (0, _defineProperty2["default"])(_classnames, "".concat(targetCls, "-clear-all-disabled"), filterSource.length === totalDisabledKeys.length), _classnames));
136
+ var targetColumns = React.useMemo(function () {
137
+ if (!columns) {
138
+ return;
139
+ }
140
+
141
+ var cancelItem = function cancelItem(data) {
142
+ if (data.disabled) {
143
+ return;
144
+ }
145
+
146
+ var curTKeys = (0, _toConsumableArray2["default"])(tKeys);
147
+
148
+ if (data.group) {
149
+ var deleteKeys = data.childrenKeys;
150
+ curTKeys = curTKeys.filter(function (tKey) {
151
+ return !deleteKeys.includes(tKey);
152
+ });
153
+ } else if (curTKeys.includes(data.key)) {
154
+ curTKeys.splice(curTKeys.indexOf(data.key), 1);
155
+ }
156
+
157
+ setTKeys(curTKeys);
158
+ };
159
+
160
+ var tColumns = (0, _toConsumableArray2["default"])(columns);
161
+ tColumns.push({
162
+ title: '',
163
+ key: 'action',
164
+ width: 40,
165
+ render: function render(_text, data) {
166
+ if (!data.disabled) {
167
+ return /*#__PURE__*/React.createElement(_acudIcon.OutlinedClose, {
168
+ className: "".concat(prefixCls, "-target-item-cancel"),
169
+ onClick: function onClick() {
170
+ return cancelItem(data);
171
+ }
172
+ });
173
+ }
174
+
175
+ return null;
176
+ }
177
+ });
178
+ return tColumns;
179
+ }, [columns, tKeys]);
180
+ var clearCls = (0, _dedupe["default"])((_classnames = {}, (0, _defineProperty2["default"])(_classnames, "".concat(targetCls, "-clear-all"), true), (0, _defineProperty2["default"])(_classnames, "".concat(targetCls, "-clear-all-disabled"), filterSource.length === totalDisabledKeys.length), _classnames));
129
181
  return /*#__PURE__*/React.createElement("div", {
130
182
  className: targetCls,
131
183
  style: rightStyle
@@ -145,7 +197,13 @@ function target(props) {
145
197
  allowClear: showSearchClear,
146
198
  size: "small",
147
199
  onChange: searchChange
148
- }), !!filterSource.length && /*#__PURE__*/React.createElement(_targetList["default"], (0, _extends2["default"])({}, props, {
200
+ }), !!filterSource.length && displayType === 'table' && /*#__PURE__*/React.createElement("div", {
201
+ className: "".concat(prefixCls, "-table-box")
202
+ }, /*#__PURE__*/React.createElement(_table["default"], {
203
+ pagination: false,
204
+ dataSource: filterSource,
205
+ columns: targetColumns
206
+ })), !!filterSource.length && displayType === 'single' && /*#__PURE__*/React.createElement(_TargetList["default"], (0, _extends2["default"])({}, props, {
149
207
  filterSource: filterSource
150
208
  })), filterSource.length === 0 && /*#__PURE__*/React.createElement("p", {
151
209
  className: "".concat(prefixCls, "-target-nodata")
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { DataSourceProps } from './dataSource';
3
- import { TransferItem } from './';
2
+ import { DataSourceProps } from './DataSource';
3
+ import { TransferItem } from '.';
4
4
  export interface DataSourceListProps<RecordType> extends DataSourceProps<RecordType> {
5
5
  filterSource: RecordType[];
6
6
  }
File without changes
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
+ import { ColumnsType } from '../table';
2
3
  export declare type TransferDirection = 'left' | 'right';
3
4
  export declare type SelectAllLabel = React.ReactNode | ((info: {
4
5
  selectedCount: number;
@@ -24,6 +25,7 @@ export interface TransferItem {
24
25
  export interface TransferProps<RecordType> {
25
26
  prefixCls?: string;
26
27
  className?: string;
28
+ displayType?: 'single' | 'table';
27
29
  dataSource: RecordType[];
28
30
  targetKeys?: string[];
29
31
  render?: TransferRender<RecordType>;
@@ -42,5 +44,6 @@ export interface TransferProps<RecordType> {
42
44
  selectAllLabels?: SelectAllLabel[];
43
45
  defaultExpandGroupKey?: string[] | string | number[] | number | boolean;
44
46
  virtual?: boolean;
47
+ columns?: ColumnsType<RecordType>;
45
48
  }
46
49
  export default function transfer<RecordType extends TransferItem = TransferItem>(props: TransferProps<RecordType>): JSX.Element;
@@ -21,9 +21,9 @@ var _classnames2 = _interopRequireDefault(require("classnames"));
21
21
 
22
22
  var _default = _interopRequireDefault(require("../locale/default"));
23
23
 
24
- var _dataSource = _interopRequireDefault(require("./dataSource"));
24
+ var _DataSource = _interopRequireDefault(require("./DataSource"));
25
25
 
26
- var _target = _interopRequireDefault(require("./target"));
26
+ var _Target = _interopRequireDefault(require("./Target"));
27
27
 
28
28
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
29
29
 
@@ -33,11 +33,13 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
33
33
  * transfer 穿梭框
34
34
  * author zhousheng
35
35
  */
36
- ;
37
-
38
36
  function transfer(props) {
37
+ var _classnames;
38
+
39
39
  var _props$prefixCls = props.prefixCls,
40
40
  prefixCls = _props$prefixCls === void 0 ? 'acud-transfer' : _props$prefixCls,
41
+ _props$displayType = props.displayType,
42
+ displayType = _props$displayType === void 0 ? 'single' : _props$displayType,
41
43
  _props$targetKeys = props.targetKeys,
42
44
  targetKeys = _props$targetKeys === void 0 ? [] : _props$targetKeys,
43
45
  onChange = props.onChange,
@@ -82,16 +84,18 @@ function transfer(props) {
82
84
  React.useEffect(function () {
83
85
  onChange && onChange(tKeys);
84
86
  }, [tKeys]);
85
- var classNames = (0, _classnames2["default"])((0, _defineProperty2["default"])({}, prefixCls, true));
87
+ var classNames = (0, _classnames2["default"])((_classnames = {}, (0, _defineProperty2["default"])(_classnames, prefixCls, true), (0, _defineProperty2["default"])(_classnames, "".concat(prefixCls, "-table"), displayType === 'table'), _classnames));
86
88
  return /*#__PURE__*/React.createElement("div", {
87
89
  className: classNames
88
- }, /*#__PURE__*/React.createElement(_dataSource["default"], (0, _extends2["default"])({}, props, {
90
+ }, /*#__PURE__*/React.createElement(_DataSource["default"], (0, _extends2["default"])({}, props, {
91
+ displayType: displayType,
89
92
  locale: userLocale,
90
93
  prefixCls: prefixCls,
91
94
  tKeys: tKeys,
92
95
  setTKeys: setTKeys,
93
96
  expansionSource: expansionSource
94
- })), /*#__PURE__*/React.createElement(_target["default"], (0, _extends2["default"])({}, props, {
97
+ })), /*#__PURE__*/React.createElement(_Target["default"], (0, _extends2["default"])({}, props, {
98
+ displayType: displayType,
95
99
  locale: userLocale,
96
100
  prefixCls: prefixCls,
97
101
  tKeys: tKeys,
@@ -2,4 +2,6 @@
2
2
 
3
3
  require("../../style/index.css");
4
4
 
5
- require("./index.css");
5
+ require("./index.css");
6
+
7
+ require("../../table/style/css");
@@ -43,8 +43,10 @@
43
43
  border-radius: 4px 4px 0 0;
44
44
  line-height: 21px;
45
45
  }
46
+ .acud-transfer-datasource-header-checkall {
47
+ margin-right: 12px;
48
+ }
46
49
  .acud-transfer-datasource-label {
47
- margin-left: 12px;
48
50
  color: #151B26;
49
51
  font-size: 12px;
50
52
  font-weight: #FFECD4;
@@ -149,8 +151,8 @@
149
151
  padding-left: 60px;
150
152
  }
151
153
  .acud-transfer-datasource-search {
152
- height: 24px;
153
- margin: 8px 12px;
154
+ height: 40px;
155
+ padding: 8px 12px;
154
156
  width: auto;
155
157
  flex-shrink: 0;
156
158
  }
@@ -327,10 +329,10 @@
327
329
  padding-left: 56px;
328
330
  }
329
331
  .acud-transfer-target-search {
330
- margin: 8px 12px;
332
+ padding: 8px 12px;
331
333
  width: auto;
332
334
  flex-shrink: 0;
333
- height: 24px;
335
+ height: 40px;
334
336
  }
335
337
  .acud-transfer-target-nodata {
336
338
  display: flex;
@@ -346,3 +348,21 @@
346
348
  .acud-transfer .acud-input input {
347
349
  font-size: 12px;
348
350
  }
351
+ .acud-transfer.acud-transfer-table .acud-transfer-datasource,
352
+ .acud-transfer.acud-transfer-table .acud-transfer-target {
353
+ height: 360px;
354
+ }
355
+ .acud-transfer.acud-transfer-table .acud-transfer-datasource-search,
356
+ .acud-transfer.acud-transfer-table .acud-transfer-target-search {
357
+ background-color: #F7F7F9;
358
+ border-top: 1px solid #fff;
359
+ }
360
+ .acud-transfer.acud-transfer-table table {
361
+ border-top: 1px solid #fff;
362
+ }
363
+ .acud-transfer.acud-transfer-table table thead tr th:nth-last-child(2) {
364
+ border-right: none;
365
+ }
366
+ .acud-transfer.acud-transfer-table .acud-transfer-table-box {
367
+ overflow: auto;
368
+ }
@@ -1,2 +1,3 @@
1
1
  import '../../style/index.less';
2
2
  import './index.less';
3
+ import '../../table/style';
@@ -2,4 +2,6 @@
2
2
 
3
3
  require("../../style/index.less");
4
4
 
5
- require("./index.less");
5
+ require("./index.less");
6
+
7
+ require("../../table/style");