@teamix/pro 1.2.31 → 1.2.32

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/common.scss ADDED
@@ -0,0 +1,22 @@
1
+ // 容器滚动条样式
2
+ @mixin hybridcloud-scrollbar {
3
+ &::-webkit-scrollbar {
4
+ width: 12px;
5
+ height: 12px;
6
+ }
7
+ &::-webkit-scrollbar-thumb {
8
+ border-color: transparent;
9
+ border-style: solid;
10
+ border-width: 4px;
11
+ background-clip: content-box;
12
+ border-radius: 6px;
13
+ background-color: var(--scrollbar-thumb-bg);
14
+ &:hover {
15
+ border-width: 3px;
16
+ background-color: var(--scrollbar-thumb-hover-bg);
17
+ }
18
+ }
19
+ &::-webkit-scrollbar-track {
20
+ background-color: transparent;
21
+ }
22
+ }
package/es/index.d.ts CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
24
24
  export * from './table';
25
25
  export * from './utils';
26
26
  export * from './step';
27
- declare const version = "1.2.31";
27
+ declare const version = "1.2.32";
28
28
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
package/es/index.js CHANGED
@@ -30,7 +30,7 @@ export * from './table';
30
30
  export * from './utils'; // export * from './sidebar';
31
31
 
32
32
  export * from './step';
33
- var version = '1.2.31';
33
+ var version = '1.2.32';
34
34
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
35
35
  ProPageContainer, ProPageHeader, ProSkeleton, ProTable, // ProSidebar,
36
36
  ProStep, hooks, nocode, templates, utils };
@@ -1,4 +1,4 @@
1
- var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
1
+ var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
2
2
 
3
3
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4
4
 
@@ -8,12 +8,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
8
8
 
9
9
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
10
10
 
11
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
12
-
13
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
-
15
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
16
-
17
11
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
18
12
 
19
13
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -26,6 +20,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
26
20
 
27
21
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
28
22
 
23
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
24
+
25
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
26
+
27
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
28
+
29
29
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
30
30
 
31
31
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -52,6 +52,7 @@ var InfoValueItem = function InfoValueItem(props) {
52
52
  actionRef = props.actionRef,
53
53
  dataSource = props.dataSource,
54
54
  context = props.context,
55
+ fieldProps = props.props,
55
56
  others = _objectWithoutProperties(props, _excluded);
56
57
 
57
58
  var dataIndex = infoItem.dataIndex,
@@ -65,7 +66,8 @@ var InfoValueItem = function InfoValueItem(props) {
65
66
  _infoItem$successMess = infoItem.successMessage,
66
67
  successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
67
68
  actions = infoItem.actions,
68
- extra = infoItem.extra; // 获取处理过的 render
69
+ extra = infoItem.extra,
70
+ valueType = infoItem.valueType; // 获取处理过的 render
69
71
 
70
72
  var getRender = function getRender() {
71
73
  var _processRenderFunctio;
@@ -77,7 +79,31 @@ var InfoValueItem = function InfoValueItem(props) {
77
79
  }
78
80
 
79
81
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
82
+
83
+ if (valueType === 'selectGroup') {
84
+ newRender = _objectSpread(_objectSpread({
85
+ maxShowNumber: 'auto',
86
+ foldText: 'more'
87
+ }, newRender), {}, {
88
+ ellipsis: false
89
+ });
90
+ }
91
+
80
92
  return newRender;
93
+ };
94
+
95
+ var getFieldProps = function getFieldProps() {
96
+ if (valueType === 'selectGroup') {
97
+ return _objectSpread({
98
+ valueAlias: {
99
+ value: 'TagValue',
100
+ key: 'TagKey'
101
+ },
102
+ layout: 'compact'
103
+ }, fieldProps);
104
+ }
105
+
106
+ return fieldProps;
81
107
  }; // 获取处理过的 dataSource
82
108
 
83
109
 
@@ -275,12 +301,12 @@ var InfoValueItem = function InfoValueItem(props) {
275
301
  onMouseLeave: function onMouseLeave() {
276
302
  setEditVisible(false);
277
303
  }
278
- }, /*#__PURE__*/React.createElement(ProField, _objectSpread({
304
+ }, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
279
305
  type: type,
280
306
  value: value,
281
307
  render: getRender(),
282
308
  dataSource: getDataSource()
283
- }, others)), /*#__PURE__*/React.createElement(PopConfirm, {
309
+ }, others), getFieldProps())), /*#__PURE__*/React.createElement(PopConfirm, {
284
310
  visible: popConfirmVisible,
285
311
  content: renderContent(),
286
312
  triggerType: "click",
@@ -307,12 +333,12 @@ var InfoValueItem = function InfoValueItem(props) {
307
333
 
308
334
  return /*#__PURE__*/React.createElement("div", {
309
335
  className: cls('item-value')
310
- }, /*#__PURE__*/React.createElement(ProField, _objectSpread({
336
+ }, /*#__PURE__*/React.createElement(ProField, _objectSpread(_objectSpread({
311
337
  type: type,
312
338
  value: value,
313
339
  render: getRender(),
314
340
  dataSource: getDataSource()
315
- }, others)), renderAction(), extra && extra);
341
+ }, others), getFieldProps())), renderAction(), extra && extra);
316
342
  };
317
343
 
318
344
  export default InfoValueItem;
@@ -20,6 +20,7 @@
20
20
  &-item-value {
21
21
  display: flex;
22
22
  align-items: center;
23
+ width: 100%;
23
24
  }
24
25
 
25
26
  }
@@ -37,7 +37,7 @@ var ProInfoItem = function ProInfoItem(prop) {
37
37
  className: cls('value')
38
38
  }, loading && /*#__PURE__*/React.createElement("div", {
39
39
  className: cls('base-skeleton-box')
40
- }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/React.createElement("div", null, value))));
40
+ }, /*#__PURE__*/React.createElement(ProSkeletonRaw.Info.Item, null)), !loading && value)));
41
41
  }
42
42
 
43
43
  if (headerInfoLayout) {
@@ -45,7 +45,9 @@ var ProInfoItem = function ProInfoItem(prop) {
45
45
  labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
46
46
  return /*#__PURE__*/React.createElement("div", {
47
47
  className: cls()
48
- }, /*#__PURE__*/React.createElement(Row, null, /*#__PURE__*/React.createElement("div", {
48
+ }, /*#__PURE__*/React.createElement(Row, {
49
+ className: cls('header-row')
50
+ }, /*#__PURE__*/React.createElement("div", {
49
51
  className: cls('header-label')
50
52
  }, /*#__PURE__*/React.createElement(LabelIconTip, {
51
53
  label: label,
@@ -17,6 +17,11 @@ $item-padding-bottom: 8px;
17
17
  .teamix-pro-field-info-form-item {
18
18
  width: 100%;
19
19
  padding-bottom: $item-padding-bottom;
20
+
21
+ &-header-row {
22
+ display: flex;
23
+ align-items: center;
24
+ }
20
25
  }
21
26
 
22
27
  .teamix-pro-field-info-form-item-label {
@@ -73,7 +73,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
73
73
  infoItem: item,
74
74
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
75
75
  actionRef: actionRef,
76
- context: context
76
+ context: context,
77
+ props: item.props
77
78
  }),
78
79
  baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
79
80
  tooltip: item.tooltip,
@@ -50,7 +50,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
50
50
  dataSource: item.dataSource,
51
51
  infoItem: item,
52
52
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
53
- actionRef: actionRef
53
+ actionRef: actionRef,
54
+ props: item.props
54
55
  }),
55
56
  headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
56
57
  tooltip: item.tooltip,
@@ -65,7 +65,8 @@ var ProTableInfo = function ProTableInfo(props) {
65
65
  dataSource: item.dataSource,
66
66
  infoItem: item,
67
67
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
68
- actionRef: actionRef
68
+ actionRef: actionRef,
69
+ props: item.props
69
70
  });
70
71
  };
71
72
 
@@ -1,4 +1,6 @@
1
+ @import '../common.scss';
1
2
  .teamix-pro-info {
3
+ @include hybridcloud-scrollbar;
2
4
  color: var(--color-brand1-6);
3
5
 
4
6
  .teamix-pro-info-content-row {
@@ -94,6 +94,8 @@ export interface ProInfoColumnsProps {
94
94
  actions?: ProActionButtonProps[];
95
95
  /** 追加在列后 */
96
96
  extra?: React.ReactNode;
97
+ /** 其他 ProField 配置 */
98
+ props?: any;
97
99
  }
98
100
  export declare type ProInfoActionType = {
99
101
  /** 刷新Info */
@@ -168,6 +170,7 @@ export declare type InfoValueItemProps = {
168
170
  render?: ProInfoCellRender;
169
171
  dataSource?: ProFieldDataSourceItem[] | ProInfoCellFunProp;
170
172
  context?: object;
173
+ props?: any;
171
174
  } & Omit<ProFieldProps, 'render' | 'dataSource'>;
172
175
  export declare type ProInfoHeaderProps = Omit<ProCardProps, 'loading'>;
173
176
  /** ProInfoGroupContextProps */
@@ -11,25 +11,21 @@ var FullScreen = function FullScreen(props) {
11
11
  normalDataFilterForm = _actionRef$current.normalDataFilterForm,
12
12
  fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
13
13
 
14
- function closeByESC(e) {
14
+ var closeByESC = function closeByESC(e) {
15
15
  if (visible && e.code === 'Escape') {
16
- var _actionRef$current2, _actionRef$current2$s, _actionRef$current3, _actionRef$current3$f;
16
+ var _actionRef$current2, _actionRef$current2$f;
17
17
 
18
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setFullScreenState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, false);
19
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
18
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$f = _actionRef$current2.fullScreen) === null || _actionRef$current2$f === void 0 ? void 0 : _actionRef$current2$f.call(_actionRef$current2);
20
19
  }
21
- } // 监听esc按钮
20
+ }; // 监听esc按钮
22
21
 
23
22
 
24
23
  useEffect(function () {
25
- var _actionRef$current4, _actionRef$current4$s;
26
-
27
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFullScreenState) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, visible);
28
24
  window.addEventListener('keydown', closeByESC);
29
25
  return function () {
30
26
  window.removeEventListener('keydown', closeByESC);
31
27
  };
32
- }, [visible]);
28
+ }, [visible, actionRef]);
33
29
 
34
30
  var afterClose = function afterClose() {
35
31
  normalDataFilterForm === null || normalDataFilterForm === void 0 ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
@@ -67,9 +63,9 @@ var FullScreen = function FullScreen(props) {
67
63
  zIndex: 999
68
64
  },
69
65
  onRequestClose: function onRequestClose() {
70
- var _actionRef$current5, _actionRef$current5$f;
66
+ var _actionRef$current3, _actionRef$current3$f;
71
67
 
72
- actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$f = _actionRef$current5.fullScreen) === null || _actionRef$current5$f === void 0 ? void 0 : _actionRef$current5$f.call(_actionRef$current5);
68
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$f = _actionRef$current3.fullScreen) === null || _actionRef$current3$f === void 0 ? void 0 : _actionRef$current3$f.call(_actionRef$current3);
73
69
  }
74
70
  }, /*#__PURE__*/React.createElement("div", {
75
71
  className: "teamix-pro-table-full-screen"
package/es/table/index.js CHANGED
@@ -463,21 +463,24 @@ var ProTable = function ProTable(props) {
463
463
 
464
464
  useActionType(actionRef, {
465
465
  fullScreen: function fullScreen() {
466
+ var _actionRef$current2, _actionRef$current2$s;
467
+
466
468
  var state = !fullscreenState; // 全屏时需要重新计算header高度
467
469
 
468
470
  getHeaderHeight().then(function (height) {
469
471
  setHeaderHeight(height);
470
472
  });
471
473
  setFullscreenState(state);
474
+ actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, 'fullScreenState', state);
472
475
  return state;
473
476
  },
474
477
  setColumn: function setColumn(newColumns) {
475
- var _actionRef$current2, _actionRef$current2$s;
478
+ var _actionRef$current3, _actionRef$current3$s;
476
479
 
477
480
  var update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
478
481
  var columns = processColumns(newColumns, propsColumns);
479
482
  setFilteredColumns(columns);
480
- (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 ? void 0 : (_actionRef$current2$s = _actionRef$current2.setState) === null || _actionRef$current2$s === void 0 ? void 0 : _actionRef$current2$s.call(_actionRef$current2, 'filterColumns', columns);
483
+ (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setState) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, 'filterColumns', columns);
481
484
 
482
485
  if (update) {
483
486
  emit('refreshFilterState', newColumns);
@@ -502,11 +505,11 @@ var ProTable = function ProTable(props) {
502
505
  _request(params);
503
506
  },
504
507
  reset: function reset() {
505
- var _actionRef$current3, _actionRef$current3$s, _dataFilterForm;
508
+ var _actionRef$current4, _actionRef$current4$s, _dataFilterForm;
506
509
 
507
510
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onReset()); // 清空列过滤参数
508
511
 
509
- (_actionRef$current3 = actionRef.current) === null || _actionRef$current3 === void 0 ? void 0 : (_actionRef$current3$s = _actionRef$current3.setFilterRules) === null || _actionRef$current3$s === void 0 ? void 0 : _actionRef$current3$s.call(_actionRef$current3, {});
512
+ (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$s = _actionRef$current4.setFilterRules) === null || _actionRef$current4$s === void 0 ? void 0 : _actionRef$current4$s.call(_actionRef$current4, {});
510
513
  (_dataFilterForm = dataFilterForm) === null || _dataFilterForm === void 0 ? void 0 : _dataFilterForm.reset();
511
514
  setCurrentPage(1);
512
515
 
@@ -621,7 +624,7 @@ var ProTable = function ProTable(props) {
621
624
  }); // 请求函数
622
625
 
623
626
  function _request(params, noLoading) {
624
- var _dataFilterForm2, _actionRef$current$ge, _actionRef$current4, _actionRef$current4$g, _objectSpread2;
627
+ var _dataFilterForm2, _actionRef$current$ge, _actionRef$current5, _actionRef$current5$g, _objectSpread2;
625
628
 
626
629
  // 如果没有传 url 且没有 customRequest,直接返回
627
630
  if (!url && !customRequest) {
@@ -636,7 +639,7 @@ var ProTable = function ProTable(props) {
636
639
 
637
640
  var dataFilterParams = toJS((_dataFilterForm2 = dataFilterForm) === null || _dataFilterForm2 === void 0 ? void 0 : _dataFilterForm2.values); // 列过滤请求参数
638
641
 
639
- var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current4 = actionRef.current) === null || _actionRef$current4 === void 0 ? void 0 : (_actionRef$current4$g = _actionRef$current4.getFilterRules) === null || _actionRef$current4$g === void 0 ? void 0 : _actionRef$current4$g.call(_actionRef$current4)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
642
+ var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$g = _actionRef$current5.getFilterRules) === null || _actionRef$current5$g === void 0 ? void 0 : _actionRef$current5$g.call(_actionRef$current5)) !== null && _actionRef$current$ge !== void 0 ? _actionRef$current$ge : {}; // 格式化后的请求参数
640
643
 
641
644
  var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread2 = {}, _defineProperty(_objectSpread2, targetPageKey, currentPage), _defineProperty(_objectSpread2, targetPageSizeKey, pageSize), _objectSpread2), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params));
642
645
 
@@ -738,11 +741,11 @@ var ProTable = function ProTable(props) {
738
741
  mode: 'inline'
739
742
  }, propsDataFilter), {}, {
740
743
  onFilter: function onFilter(values) {
741
- var _actionRef$current5, _actionRef$current5$c;
744
+ var _actionRef$current6, _actionRef$current6$c;
742
745
 
743
746
  (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter) && (propsDataFilter === null || propsDataFilter === void 0 ? void 0 : propsDataFilter.onFilter(values)); // 搜索变化时,暂时先清空选择
744
747
 
745
- (_actionRef$current5 = actionRef.current) === null || _actionRef$current5 === void 0 ? void 0 : (_actionRef$current5$c = _actionRef$current5.clearRowSelection) === null || _actionRef$current5$c === void 0 ? void 0 : _actionRef$current5$c.call(_actionRef$current5);
748
+ (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
746
749
  setCurrentPage(1);
747
750
 
748
751
  _request(_defineProperty({}, targetPageKey, 1));
@@ -838,21 +841,21 @@ var ProTable = function ProTable(props) {
838
841
 
839
842
  var renderFooter = function renderFooter() {
840
843
  function onChangePagination(currentPage) {
841
- var _actionRef$current6, _actionRef$current6$c;
844
+ var _actionRef$current7, _actionRef$current7$c;
842
845
 
843
846
  var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
844
847
  // 翻页暂时先清空选择
845
- (_actionRef$current6 = actionRef.current) === null || _actionRef$current6 === void 0 ? void 0 : (_actionRef$current6$c = _actionRef$current6.clearRowSelection) === null || _actionRef$current6$c === void 0 ? void 0 : _actionRef$current6$c.call(_actionRef$current6);
848
+ (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$c = _actionRef$current7.clearRowSelection) === null || _actionRef$current7$c === void 0 ? void 0 : _actionRef$current7$c.call(_actionRef$current7);
846
849
  setCurrentPage(currentPage);
847
850
 
848
851
  _request(_objectSpread(_defineProperty({}, targetPageKey, currentPage), params));
849
852
  }
850
853
 
851
854
  function onChangePaginationSize(currentPageSize) {
852
- var _actionRef$current7, _actionRef$current7$c, _request5;
855
+ var _actionRef$current8, _actionRef$current8$c, _request5;
853
856
 
854
857
  // 翻页暂时先清空选择
855
- (_actionRef$current7 = actionRef.current) === null || _actionRef$current7 === void 0 ? void 0 : (_actionRef$current7$c = _actionRef$current7.clearRowSelection) === null || _actionRef$current7$c === void 0 ? void 0 : _actionRef$current7$c.call(_actionRef$current7);
858
+ (_actionRef$current8 = actionRef.current) === null || _actionRef$current8 === void 0 ? void 0 : (_actionRef$current8$c = _actionRef$current8.clearRowSelection) === null || _actionRef$current8$c === void 0 ? void 0 : _actionRef$current8$c.call(_actionRef$current8);
856
859
  setPageSize(currentPageSize);
857
860
  setCurrentPage(1);
858
861
 
@@ -0,0 +1,22 @@
1
+ // 容器滚动条样式
2
+ @mixin hybridcloud-scrollbar {
3
+ &::-webkit-scrollbar {
4
+ width: 12px;
5
+ height: 12px;
6
+ }
7
+ &::-webkit-scrollbar-thumb {
8
+ border-color: transparent;
9
+ border-style: solid;
10
+ border-width: 4px;
11
+ background-clip: content-box;
12
+ border-radius: 6px;
13
+ background-color: var(--scrollbar-thumb-bg);
14
+ &:hover {
15
+ border-width: 3px;
16
+ background-color: var(--scrollbar-thumb-hover-bg);
17
+ }
18
+ }
19
+ &::-webkit-scrollbar-track {
20
+ background-color: transparent;
21
+ }
22
+ }
package/lib/index.d.ts CHANGED
@@ -24,5 +24,5 @@ export * from './skeleton';
24
24
  export * from './table';
25
25
  export * from './utils';
26
26
  export * from './step';
27
- declare const version = "1.2.31";
27
+ declare const version = "1.2.32";
28
28
  export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProStep, hooks, nocode, templates, utils, };
package/lib/index.js CHANGED
@@ -285,5 +285,5 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
285
285
  // 设置图标源
286
286
  _icon.default.setConfig(_utils.default.getTeamixIconConfig());
287
287
 
288
- var version = '1.2.31';
288
+ var version = '1.2.32';
289
289
  exports.version = version;
@@ -25,7 +25,7 @@ var _components = require("@alicloudfe/components");
25
25
 
26
26
  var _actions = require("../../../actions");
27
27
 
28
- var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
28
+ var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
29
29
 
30
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); }
31
31
 
@@ -41,12 +41,6 @@ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symb
41
41
 
42
42
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
43
43
 
44
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
45
-
46
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
47
-
48
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
49
-
50
44
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
51
45
 
52
46
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
@@ -59,6 +53,12 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
59
53
 
60
54
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
61
55
 
56
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
57
+
58
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
59
+
60
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
61
+
62
62
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
63
63
 
64
64
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
@@ -76,6 +76,7 @@ var InfoValueItem = function InfoValueItem(props) {
76
76
  actionRef = props.actionRef,
77
77
  dataSource = props.dataSource,
78
78
  context = props.context,
79
+ fieldProps = props.props,
79
80
  others = _objectWithoutProperties(props, _excluded);
80
81
 
81
82
  var dataIndex = infoItem.dataIndex,
@@ -89,7 +90,8 @@ var InfoValueItem = function InfoValueItem(props) {
89
90
  _infoItem$successMess = infoItem.successMessage,
90
91
  successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
91
92
  actions = infoItem.actions,
92
- extra = infoItem.extra; // 获取处理过的 render
93
+ extra = infoItem.extra,
94
+ valueType = infoItem.valueType; // 获取处理过的 render
93
95
 
94
96
  var getRender = function getRender() {
95
97
  var _processRenderFunctio;
@@ -101,7 +103,31 @@ var InfoValueItem = function InfoValueItem(props) {
101
103
  }
102
104
 
103
105
  var newRender = processBuriedPoint((_processRenderFunctio = processRenderFunction(render !== null && render !== void 0 ? render : {}, value, record)) !== null && _processRenderFunctio !== void 0 ? _processRenderFunctio : {}, value, record);
106
+
107
+ if (valueType === 'selectGroup') {
108
+ newRender = _objectSpread(_objectSpread({
109
+ maxShowNumber: 'auto',
110
+ foldText: 'more'
111
+ }, newRender), {}, {
112
+ ellipsis: false
113
+ });
114
+ }
115
+
104
116
  return newRender;
117
+ };
118
+
119
+ var getFieldProps = function getFieldProps() {
120
+ if (valueType === 'selectGroup') {
121
+ return _objectSpread({
122
+ valueAlias: {
123
+ value: 'TagValue',
124
+ key: 'TagKey'
125
+ },
126
+ layout: 'compact'
127
+ }, fieldProps);
128
+ }
129
+
130
+ return fieldProps;
105
131
  }; // 获取处理过的 dataSource
106
132
 
107
133
 
@@ -300,12 +326,12 @@ var InfoValueItem = function InfoValueItem(props) {
300
326
  onMouseLeave: function onMouseLeave() {
301
327
  setEditVisible(false);
302
328
  }
303
- }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
329
+ }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({
304
330
  type: type,
305
331
  value: value,
306
332
  render: getRender(),
307
333
  dataSource: getDataSource()
308
- }, others)), /*#__PURE__*/_react.default.createElement(_popConfirm.default, {
334
+ }, others), getFieldProps())), /*#__PURE__*/_react.default.createElement(_popConfirm.default, {
309
335
  visible: popConfirmVisible,
310
336
  content: renderContent(),
311
337
  triggerType: "click",
@@ -332,12 +358,12 @@ var InfoValueItem = function InfoValueItem(props) {
332
358
 
333
359
  return /*#__PURE__*/_react.default.createElement("div", {
334
360
  className: cls('item-value')
335
- }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread({
361
+ }, /*#__PURE__*/_react.default.createElement(_field.default, _objectSpread(_objectSpread({
336
362
  type: type,
337
363
  value: value,
338
364
  render: getRender(),
339
365
  dataSource: getDataSource()
340
- }, others)), renderAction(), extra && extra);
366
+ }, others), getFieldProps())), renderAction(), extra && extra);
341
367
  };
342
368
 
343
369
  var _default = InfoValueItem;
@@ -20,6 +20,7 @@
20
20
  &-item-value {
21
21
  display: flex;
22
22
  align-items: center;
23
+ width: 100%;
23
24
  }
24
25
 
25
26
  }
@@ -51,7 +51,7 @@ var ProInfoItem = function ProInfoItem(prop) {
51
51
  className: cls('value')
52
52
  }, loading && /*#__PURE__*/_react.default.createElement("div", {
53
53
  className: cls('base-skeleton-box')
54
- }, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && /*#__PURE__*/_react.default.createElement("div", null, value))));
54
+ }, /*#__PURE__*/_react.default.createElement(_.ProSkeletonRaw.Info.Item, null)), !loading && value)));
55
55
  }
56
56
 
57
57
  if (headerInfoLayout) {
@@ -59,7 +59,9 @@ var ProInfoItem = function ProInfoItem(prop) {
59
59
  labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
60
60
  return /*#__PURE__*/_react.default.createElement("div", {
61
61
  className: cls()
62
- }, /*#__PURE__*/_react.default.createElement(Row, null, /*#__PURE__*/_react.default.createElement("div", {
62
+ }, /*#__PURE__*/_react.default.createElement(Row, {
63
+ className: cls('header-row')
64
+ }, /*#__PURE__*/_react.default.createElement("div", {
63
65
  className: cls('header-label')
64
66
  }, /*#__PURE__*/_react.default.createElement(_utils.LabelIconTip, {
65
67
  label: label,
@@ -17,6 +17,11 @@ $item-padding-bottom: 8px;
17
17
  .teamix-pro-field-info-form-item {
18
18
  width: 100%;
19
19
  padding-bottom: $item-padding-bottom;
20
+
21
+ &-header-row {
22
+ display: flex;
23
+ align-items: center;
24
+ }
20
25
  }
21
26
 
22
27
  .teamix-pro-field-info-form-item-label {
@@ -92,7 +92,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
92
92
  infoItem: item,
93
93
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
94
94
  actionRef: actionRef,
95
- context: context
95
+ context: context,
96
+ props: item.props
96
97
  }),
97
98
  baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
98
99
  tooltip: item.tooltip,
@@ -68,7 +68,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
68
68
  dataSource: item.dataSource,
69
69
  infoItem: item,
70
70
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
71
- actionRef: actionRef
71
+ actionRef: actionRef,
72
+ props: item.props
72
73
  }),
73
74
  headerInfoLayout: layout !== null && layout !== void 0 ? layout : defaultLayout,
74
75
  tooltip: item.tooltip,
@@ -85,7 +85,8 @@ var ProTableInfo = function ProTableInfo(props) {
85
85
  dataSource: item.dataSource,
86
86
  infoItem: item,
87
87
  record: dataSource !== null && dataSource !== void 0 ? dataSource : result,
88
- actionRef: actionRef
88
+ actionRef: actionRef,
89
+ props: item.props
89
90
  });
90
91
  };
91
92
 
@@ -1,4 +1,6 @@
1
+ @import '../common.scss';
1
2
  .teamix-pro-info {
3
+ @include hybridcloud-scrollbar;
2
4
  color: var(--color-brand1-6);
3
5
 
4
6
  .teamix-pro-info-content-row {