@teamix/pro 1.2.28 → 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/dist/pro.css +1 -1
- package/dist/pro.js +368 -252
- package/dist/pro.min.css +1 -1
- package/dist/pro.min.js +1 -1
- package/es/common.scss +22 -0
- package/es/form/Filter/SimpleFilter.js +10 -3
- package/es/form/typing.d.ts +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/InfoValueItem/index.js +38 -12
- package/es/info/components/InfoValueItem/index.scss +1 -0
- package/es/info/components/ProInfoItem/index.js +4 -2
- package/es/info/components/ProInfoItem/index.scss +5 -0
- package/es/info/components/baseInfo/index.js +4 -2
- package/es/info/components/headerInfo/index.js +2 -1
- package/es/info/components/tableInfo/index.js +2 -1
- package/es/info/index.scss +2 -0
- package/es/info/typing.d.ts +3 -0
- package/es/table/components/Filter/index.js +6 -6
- package/es/table/components/Layout/index.js +18 -3
- package/es/table/components/ToolBar/Fullscreen.js +7 -11
- package/es/table/index.js +96 -35
- package/es/table/index.scss +4 -0
- package/es/table/typing.d.ts +2 -2
- package/es/table/utils/columnRender.js +1 -1
- package/es/table/utils/index.d.ts +2 -1
- package/es/table/utils/index.js +62 -113
- package/lib/common.scss +22 -0
- package/lib/form/Filter/SimpleFilter.js +8 -1
- package/lib/form/typing.d.ts +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/InfoValueItem/index.js +38 -12
- package/lib/info/components/InfoValueItem/index.scss +1 -0
- package/lib/info/components/ProInfoItem/index.js +4 -2
- package/lib/info/components/ProInfoItem/index.scss +5 -0
- package/lib/info/components/baseInfo/index.js +4 -2
- package/lib/info/components/headerInfo/index.js +2 -1
- package/lib/info/components/tableInfo/index.js +2 -1
- package/lib/info/index.scss +2 -0
- package/lib/info/typing.d.ts +3 -0
- package/lib/table/components/Filter/index.js +6 -6
- package/lib/table/components/Layout/index.js +18 -3
- package/lib/table/components/ToolBar/Fullscreen.js +7 -11
- package/lib/table/index.js +95 -34
- package/lib/table/index.scss +4 -0
- package/lib/table/typing.d.ts +2 -2
- package/lib/table/utils/columnRender.js +1 -1
- package/lib/table/utils/index.d.ts +2 -1
- package/lib/table/utils/index.js +63 -112
- package/package.json +1 -1
- package/es/form/Components/SelectTable/index.d.ts +0 -24
- package/es/form/Components/SelectTable/index.js +0 -135
- package/es/form/Components/SelectTable/index.scss +0 -28
- package/es/form/Components/SelectTable/table.d.ts +0 -6
- package/es/form/Components/SelectTable/table.js +0 -64
- package/lib/form/Components/SelectTable/index.d.ts +0 -24
- package/lib/form/Components/SelectTable/index.js +0 -157
- package/lib/form/Components/SelectTable/index.scss +0 -28
- package/lib/form/Components/SelectTable/table.d.ts +0 -6
- package/lib/form/Components/SelectTable/table.js +0 -76
package/dist/pro.js
CHANGED
@@ -52875,7 +52875,7 @@ var FieldSelect = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().forw
|
|
52875
52875
|
/* harmony import */ var _output__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(90405);
|
52876
52876
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72326);
|
52877
52877
|
/* harmony import */ var _selectGroup__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(47363);
|
52878
|
-
var _excluded = ["dataSource", "type", "value", "onChange", "mode", "render", "valueAlias"];
|
52878
|
+
var _excluded = ["dataSource", "type", "value", "onChange", "mode", "render", "valueAlias", "fieldRef"];
|
52879
52879
|
|
52880
52880
|
function ownKeys(object, enumerableOnly) {
|
52881
52881
|
var keys = Object.keys(object);
|
@@ -53041,7 +53041,10 @@ function _arrayLikeToArray(arr, len) {
|
|
53041
53041
|
|
53042
53042
|
// 处理 value
|
53043
53043
|
|
53044
|
-
var precessValue = function precessValue(
|
53044
|
+
var precessValue = function precessValue() {
|
53045
|
+
var value = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
53046
|
+
var valueAlias = arguments.length > 1 ? arguments[1] : undefined;
|
53047
|
+
|
53045
53048
|
var _ref = valueAlias !== null && valueAlias !== void 0 ? valueAlias : {},
|
53046
53049
|
_ref$value = _ref.value,
|
53047
53050
|
valueAliasValue = _ref$value === void 0 ? 'value' : _ref$value,
|
@@ -53088,6 +53091,7 @@ var FieldSelectGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
53088
53091
|
mode = props.mode,
|
53089
53092
|
render = props.render,
|
53090
53093
|
valueAlias = props.valueAlias,
|
53094
|
+
fieldRef = props.fieldRef,
|
53091
53095
|
others = _objectWithoutProperties(props, _excluded);
|
53092
53096
|
|
53093
53097
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_3__.useState)(precessValue(value, valueAlias)),
|
@@ -53122,7 +53126,7 @@ var FieldSelectGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
53122
53126
|
value: fieldVal,
|
53123
53127
|
onChange: function onChange(value) {
|
53124
53128
|
setFieldVal(value);
|
53125
|
-
_onChange === null || _onChange === void 0 ? void 0 : _onChange(value);
|
53129
|
+
_onChange === null || _onChange === void 0 ? void 0 : _onChange((0,_utils__WEBPACK_IMPORTED_MODULE_6__/* .formatterOnchangeValue */ .WO)(value));
|
53126
53130
|
},
|
53127
53131
|
valueAlias: valueAlias
|
53128
53132
|
}, others));
|
@@ -53165,6 +53169,9 @@ var FieldSelectGroup = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default()
|
|
53165
53169
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.ProTagGroup, {
|
53166
53170
|
tag: tags,
|
53167
53171
|
maxShowNumber: (_outputRender$maxShow = outputRender.maxShowNumber) !== null && _outputRender$maxShow !== void 0 ? _outputRender$maxShow : 'all',
|
53172
|
+
// 右侧小笔的宽度
|
53173
|
+
otherOccupiedSpace: 26,
|
53174
|
+
target: fieldRef,
|
53168
53175
|
renderMore: function renderMore(count, _, ref) {
|
53169
53176
|
var _ref$current$querySel, _ref$current, _tagsDom$children, _outputRender2, _outputRender$foldTex, _outputRender3, _outputRender4;
|
53170
53177
|
|
@@ -55546,7 +55553,8 @@ var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.baseClass)('teamix-pro-f
|
|
55546
55553
|
|
55547
55554
|
var Copy = function Copy(props) {
|
55548
55555
|
var result = props.result,
|
55549
|
-
value = props.value
|
55556
|
+
value = props.value,
|
55557
|
+
render = props.render; // copy 的显隐状态
|
55550
55558
|
|
55551
55559
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_4__.useState)(false),
|
55552
55560
|
_useState2 = _slicedToArray(_useState, 2),
|
@@ -55576,7 +55584,19 @@ var Copy = function Copy(props) {
|
|
55576
55584
|
style: {
|
55577
55585
|
opacity: copyVisible ? 1 : 0
|
55578
55586
|
},
|
55579
|
-
onClick: function onClick() {
|
55587
|
+
onClick: function onClick(e) {
|
55588
|
+
if (render === null || render === void 0 ? void 0 : render.stopPropagation) {
|
55589
|
+
var _e$stopPropagation;
|
55590
|
+
|
55591
|
+
e === null || e === void 0 ? void 0 : (_e$stopPropagation = e.stopPropagation) === null || _e$stopPropagation === void 0 ? void 0 : _e$stopPropagation.call(e);
|
55592
|
+
}
|
55593
|
+
|
55594
|
+
if (render === null || render === void 0 ? void 0 : render.preventDefault) {
|
55595
|
+
var _e$preventDefault;
|
55596
|
+
|
55597
|
+
e === null || e === void 0 ? void 0 : (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
55598
|
+
}
|
55599
|
+
|
55580
55600
|
if (copy_to_clipboard__WEBPACK_IMPORTED_MODULE_3___default()((value !== null && value !== void 0 ? value : '').toString())) {
|
55581
55601
|
_alicloudfe_components__WEBPACK_IMPORTED_MODULE_0__.Message.success((0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getMessage)('copySucceeded'));
|
55582
55602
|
} else {
|
@@ -55623,7 +55643,8 @@ var Description = function Description(props) {
|
|
55623
55643
|
if (render === null || render === void 0 ? void 0 : render.descriptionCopy) {
|
55624
55644
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Copy__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
|
55625
55645
|
result: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, description),
|
55626
|
-
value: copyText
|
55646
|
+
value: copyText,
|
55647
|
+
render: render
|
55627
55648
|
});
|
55628
55649
|
}
|
55629
55650
|
|
@@ -55647,7 +55668,8 @@ var Description = function Description(props) {
|
|
55647
55668
|
if (render.descriptionCopy) {
|
55648
55669
|
result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Copy__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .Z, {
|
55649
55670
|
result: result,
|
55650
|
-
value: copyText
|
55671
|
+
value: copyText,
|
55672
|
+
render: render
|
55651
55673
|
});
|
55652
55674
|
}
|
55653
55675
|
|
@@ -55824,7 +55846,8 @@ var Edit = function Edit(props) {
|
|
55824
55846
|
value = props.value,
|
55825
55847
|
renderEdit = props.renderEdit,
|
55826
55848
|
editPopConfirmProps = props.editPopConfirmProps,
|
55827
|
-
editOnClick = props.editOnClick
|
55849
|
+
editOnClick = props.editOnClick,
|
55850
|
+
render = props.render; // 设置浮层打开关闭 暴露给外层组件
|
55828
55851
|
|
55829
55852
|
var setPopConfirmVisibleFunc = function setPopConfirmVisibleFunc(status) {
|
55830
55853
|
if (!status) {
|
@@ -55845,6 +55868,18 @@ var Edit = function Edit(props) {
|
|
55845
55868
|
opacity: editVisible || popConfirmVisible ? 1 : 0
|
55846
55869
|
},
|
55847
55870
|
onClick: function onClick(e) {
|
55871
|
+
if (render === null || render === void 0 ? void 0 : render.stopPropagation) {
|
55872
|
+
var _e$stopPropagation;
|
55873
|
+
|
55874
|
+
e === null || e === void 0 ? void 0 : (_e$stopPropagation = e.stopPropagation) === null || _e$stopPropagation === void 0 ? void 0 : _e$stopPropagation.call(e);
|
55875
|
+
}
|
55876
|
+
|
55877
|
+
if (render === null || render === void 0 ? void 0 : render.preventDefault) {
|
55878
|
+
var _e$preventDefault;
|
55879
|
+
|
55880
|
+
e === null || e === void 0 ? void 0 : (_e$preventDefault = e.preventDefault) === null || _e$preventDefault === void 0 ? void 0 : _e$preventDefault.call(e);
|
55881
|
+
}
|
55882
|
+
|
55848
55883
|
if (editOnClick) {
|
55849
55884
|
editOnClick === null || editOnClick === void 0 ? void 0 : editOnClick(value, e);
|
55850
55885
|
return;
|
@@ -56237,7 +56272,8 @@ function individualization(dom, render, value, fieldValue) {
|
|
56237
56272
|
var copyText = typeof (render === null || render === void 0 ? void 0 : render.copy) === 'string' ? render === null || render === void 0 ? void 0 : render.copy : value;
|
56238
56273
|
result = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_Copy__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .Z, {
|
56239
56274
|
result: result,
|
56240
|
-
value: copyText
|
56275
|
+
value: copyText,
|
56276
|
+
render: render
|
56241
56277
|
});
|
56242
56278
|
} // 主文本 编辑
|
56243
56279
|
|
@@ -57584,8 +57620,6 @@ var CheckboxItem = _alicloudfe_components__WEBPACK_IMPORTED_MODULE_0__.Menu.Chec
|
|
57584
57620
|
var cls = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.baseClass)('teamix-select-group');
|
57585
57621
|
|
57586
57622
|
var SelectGroup = function SelectGroup(props) {
|
57587
|
-
var _dataSource$0$dataSou, _dataSource$;
|
57588
|
-
|
57589
57623
|
var trigger = props.trigger,
|
57590
57624
|
_props$triggerType = props.triggerType,
|
57591
57625
|
triggerType = _props$triggerType === void 0 ? 'click' : _props$triggerType,
|
@@ -57640,7 +57674,21 @@ var SelectGroup = function SelectGroup(props) {
|
|
57640
57674
|
_ref2$label = _ref2.label,
|
57641
57675
|
dataSourceAliasLabel = _ref2$label === void 0 ? 'label' : _ref2$label,
|
57642
57676
|
_ref2$children = _ref2.children,
|
57643
|
-
dataSourceAliasChildren = _ref2$children === void 0 ? 'children' : _ref2$children; //
|
57677
|
+
dataSourceAliasChildren = _ref2$children === void 0 ? 'children' : _ref2$children; // 获取 dataSource Value 值
|
57678
|
+
|
57679
|
+
|
57680
|
+
var getDataSourceValue = function getDataSourceValue(item) {
|
57681
|
+
var _ref3, _item$dataSourceAlias;
|
57682
|
+
|
57683
|
+
return (_ref3 = (_item$dataSourceAlias = item === null || item === void 0 ? void 0 : item[dataSourceAliasValue]) !== null && _item$dataSourceAlias !== void 0 ? _item$dataSourceAlias : item === null || item === void 0 ? void 0 : item[dataSourceAliasLabel]) !== null && _ref3 !== void 0 ? _ref3 : item === null || item === void 0 ? void 0 : item.toString();
|
57684
|
+
}; // 获取 dataSource Value 值
|
57685
|
+
|
57686
|
+
|
57687
|
+
var getDataSourceLabel = function getDataSourceLabel(item) {
|
57688
|
+
var _ref4, _item$dataSourceAlias2;
|
57689
|
+
|
57690
|
+
return (_ref4 = (_item$dataSourceAlias2 = item === null || item === void 0 ? void 0 : item[dataSourceAliasLabel]) !== null && _item$dataSourceAlias2 !== void 0 ? _item$dataSourceAlias2 : item === null || item === void 0 ? void 0 : item[dataSourceAliasValue]) !== null && _ref4 !== void 0 ? _ref4 : item === null || item === void 0 ? void 0 : item.toString();
|
57691
|
+
}; // 搜索框绑定值
|
57644
57692
|
|
57645
57693
|
|
57646
57694
|
var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultSearchValue),
|
@@ -57655,7 +57703,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57655
57703
|
setDataSource = _useState6[1]; // 右侧 values 列表 展示当前的 key
|
57656
57704
|
|
57657
57705
|
|
57658
|
-
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)((
|
57706
|
+
var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(getDataSourceValue(dataSource === null || dataSource === void 0 ? void 0 : dataSource[0])),
|
57659
57707
|
_useState8 = _slicedToArray(_useState7, 2),
|
57660
57708
|
activeKey = _useState8[0],
|
57661
57709
|
setActiveKey = _useState8[1];
|
@@ -57749,39 +57797,38 @@ var SelectGroup = function SelectGroup(props) {
|
|
57749
57797
|
}, [valueProp]);
|
57750
57798
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {
|
57751
57799
|
setDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
57800
|
+
setActiveKey(getDataSourceValue(dataSourceProp === null || dataSourceProp === void 0 ? void 0 : dataSourceProp[0]));
|
57752
57801
|
}, [dataSourceProp]); // 搜索值变化回调 过滤数据
|
57753
57802
|
|
57754
57803
|
var onSearch = function onSearch(value) {
|
57755
57804
|
setSearchValue(value);
|
57756
57805
|
var searchHandle = lodash_debounce__WEBPACK_IMPORTED_MODULE_5___default()(function () {
|
57757
|
-
var _newDataSource,
|
57806
|
+
var _newDataSource, _newDataSource2;
|
57758
57807
|
|
57759
57808
|
if (!value) {
|
57760
|
-
var _dataSourceProp$0$dat, _dataSourceProp$;
|
57761
|
-
|
57762
57809
|
setDataSource(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
57763
|
-
setActiveKey((
|
57810
|
+
setActiveKey(getDataSourceValue(dataSourceProp === null || dataSourceProp === void 0 ? void 0 : dataSourceProp[0]));
|
57764
57811
|
onSearchChange === null || onSearchChange === void 0 ? void 0 : onSearchChange(value);
|
57765
57812
|
return;
|
57766
57813
|
}
|
57767
57814
|
|
57768
57815
|
var newDataSource = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_4___default()(dataSourceProp !== null && dataSourceProp !== void 0 ? dataSourceProp : []);
|
57769
57816
|
(_newDataSource = newDataSource) === null || _newDataSource === void 0 ? void 0 : _newDataSource.forEach(function (item) {
|
57770
|
-
if (!(item
|
57771
|
-
var _item$
|
57817
|
+
if (!(getDataSourceLabel(item) && getDataSourceLabel(item).toString().toLocaleLowerCase().includes(value.toString().toLocaleLowerCase()))) {
|
57818
|
+
var _item$dataSourceAlias3, _item$dataSourceAlias4;
|
57772
57819
|
|
57773
|
-
item[dataSourceAliasChildren] = (_item$
|
57774
|
-
var
|
57820
|
+
item[dataSourceAliasChildren] = (_item$dataSourceAlias3 = (_item$dataSourceAlias4 = item[dataSourceAliasChildren]) === null || _item$dataSourceAlias4 === void 0 ? void 0 : _item$dataSourceAlias4.filter(function (valueItem) {
|
57821
|
+
var _getDataSourceLabel;
|
57775
57822
|
|
57776
|
-
return ((
|
57777
|
-
})) !== null && _item$
|
57823
|
+
return ((_getDataSourceLabel = getDataSourceLabel(valueItem)) !== null && _getDataSourceLabel !== void 0 ? _getDataSourceLabel : '').toString().toLocaleLowerCase().includes(value.toString().toLocaleLowerCase());
|
57824
|
+
})) !== null && _item$dataSourceAlias3 !== void 0 ? _item$dataSourceAlias3 : [];
|
57778
57825
|
}
|
57779
57826
|
});
|
57780
57827
|
newDataSource = newDataSource.filter(function (item) {
|
57781
57828
|
return item[dataSourceAliasChildren] && item[dataSourceAliasChildren].length > 0;
|
57782
57829
|
});
|
57783
57830
|
setDataSource(newDataSource);
|
57784
|
-
setActiveKey((
|
57831
|
+
setActiveKey(getDataSourceValue((_newDataSource2 = newDataSource) === null || _newDataSource2 === void 0 ? void 0 : _newDataSource2[0]));
|
57785
57832
|
onSearchChange === null || onSearchChange === void 0 ? void 0 : onSearchChange(value);
|
57786
57833
|
}, 100);
|
57787
57834
|
searchHandle();
|
@@ -57792,10 +57839,10 @@ var SelectGroup = function SelectGroup(props) {
|
|
57792
57839
|
var _dataSourceValues$dat, _values$valueAliasVal;
|
57793
57840
|
|
57794
57841
|
var dataSourceValues = dataSource === null || dataSource === void 0 ? void 0 : dataSource.find(function (item) {
|
57795
|
-
return item
|
57842
|
+
return getDataSourceValue(item) === getDataSourceValue(keyItem);
|
57796
57843
|
});
|
57797
57844
|
var values = value === null || value === void 0 ? void 0 : value.find(function (item) {
|
57798
|
-
return item[valueAliasKey] === keyItem
|
57845
|
+
return item[valueAliasKey] === getDataSourceValue(keyItem);
|
57799
57846
|
});
|
57800
57847
|
return (dataSourceValues === null || dataSourceValues === void 0 ? void 0 : (_dataSourceValues$dat = dataSourceValues[dataSourceAliasChildren]) === null || _dataSourceValues$dat === void 0 ? void 0 : _dataSourceValues$dat.length) === (values === null || values === void 0 ? void 0 : (_values$valueAliasVal = values[valueAliasValue]) === null || _values$valueAliasVal === void 0 ? void 0 : _values$valueAliasVal.length);
|
57801
57848
|
}; // key 值 checkbox 全选状态改变
|
@@ -57806,21 +57853,19 @@ var SelectGroup = function SelectGroup(props) {
|
|
57806
57853
|
var _cloneDeep$filter, _cloneDeep;
|
57807
57854
|
|
57808
57855
|
var allValues = dataSource === null || dataSource === void 0 ? void 0 : dataSource.find(function (item) {
|
57809
|
-
return item
|
57856
|
+
return getDataSourceValue(item) === getDataSourceValue(keyItem);
|
57810
57857
|
});
|
57811
57858
|
var newValues = (_cloneDeep$filter = (_cloneDeep = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_4___default()(value)) === null || _cloneDeep === void 0 ? void 0 : _cloneDeep.filter(function (item) {
|
57812
|
-
return item[valueAliasKey] !== keyItem
|
57859
|
+
return item[valueAliasKey] !== getDataSourceValue(keyItem);
|
57813
57860
|
})) !== null && _cloneDeep$filter !== void 0 ? _cloneDeep$filter : [];
|
57814
57861
|
|
57815
57862
|
if ((allValues === null || allValues === void 0 ? void 0 : allValues[dataSourceAliasChildren]) && allValues[dataSourceAliasChildren].length > 0) {
|
57816
57863
|
var _newValues$push;
|
57817
57864
|
|
57818
57865
|
var childrenValues = allValues === null || allValues === void 0 ? void 0 : allValues[dataSourceAliasChildren].map(function (item) {
|
57819
|
-
|
57820
|
-
|
57821
|
-
return (_item$dataSourceAlias3 = item === null || item === void 0 ? void 0 : item[dataSourceAliasValue]) !== null && _item$dataSourceAlias3 !== void 0 ? _item$dataSourceAlias3 : '';
|
57866
|
+
return getDataSourceValue(item);
|
57822
57867
|
});
|
57823
|
-
newValues === null || newValues === void 0 ? void 0 : newValues.push((_newValues$push = {}, _defineProperty(_newValues$push, valueAliasKey, allValues
|
57868
|
+
newValues === null || newValues === void 0 ? void 0 : newValues.push((_newValues$push = {}, _defineProperty(_newValues$push, valueAliasKey, getDataSourceValue(allValues)), _defineProperty(_newValues$push, valueAliasValue, childrenValues), _newValues$push));
|
57824
57869
|
}
|
57825
57870
|
|
57826
57871
|
setValue(newValues);
|
@@ -57829,7 +57874,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57829
57874
|
var _cloneDeep$filter2, _cloneDeep2;
|
57830
57875
|
|
57831
57876
|
var _newValues = (_cloneDeep$filter2 = (_cloneDeep2 = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_4___default()(value)) === null || _cloneDeep2 === void 0 ? void 0 : _cloneDeep2.filter(function (item) {
|
57832
|
-
return item[valueAliasKey] !== keyItem
|
57877
|
+
return item[valueAliasKey] !== getDataSourceValue(keyItem);
|
57833
57878
|
})) !== null && _cloneDeep$filter2 !== void 0 ? _cloneDeep$filter2 : [];
|
57834
57879
|
|
57835
57880
|
setValue(_newValues);
|
@@ -57840,7 +57885,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57840
57885
|
|
57841
57886
|
var onKeyCheckboxClick = function onKeyCheckboxClick(keyItem, event) {
|
57842
57887
|
event.stopPropagation();
|
57843
|
-
setActiveKey(keyItem
|
57888
|
+
setActiveKey(getDataSourceValue(keyItem));
|
57844
57889
|
}; // 获取 key 对应的 values
|
57845
57890
|
|
57846
57891
|
|
@@ -57852,7 +57897,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57852
57897
|
}
|
57853
57898
|
|
57854
57899
|
return (_dataSource$find$data = dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$find = dataSource.find(function (item) {
|
57855
|
-
return item
|
57900
|
+
return getDataSourceValue(item) === key;
|
57856
57901
|
})) === null || _dataSource$find === void 0 ? void 0 : _dataSource$find[dataSourceAliasChildren]) !== null && _dataSource$find$data !== void 0 ? _dataSource$find$data : [];
|
57857
57902
|
}; // 获取 key 对应的中间态
|
57858
57903
|
|
@@ -57861,12 +57906,12 @@ var SelectGroup = function SelectGroup(props) {
|
|
57861
57906
|
var _value$find$valueAlia, _value$find, _dataSource$find$data2, _dataSource$find2, _dataSource$find2$dat;
|
57862
57907
|
|
57863
57908
|
var valueItem = (_value$find$valueAlia = value === null || value === void 0 ? void 0 : (_value$find = value.find(function (item) {
|
57864
|
-
return item[valueAliasKey] === keyItem
|
57909
|
+
return item[valueAliasKey] === getDataSourceValue(keyItem);
|
57865
57910
|
})) === null || _value$find === void 0 ? void 0 : _value$find[valueAliasValue]) !== null && _value$find$valueAlia !== void 0 ? _value$find$valueAlia : [];
|
57866
57911
|
var dataSourceValueItem = (_dataSource$find$data2 = dataSource === null || dataSource === void 0 ? void 0 : (_dataSource$find2 = dataSource.find(function (item) {
|
57867
|
-
return item
|
57912
|
+
return getDataSourceValue(item) === getDataSourceValue(keyItem);
|
57868
57913
|
})) === null || _dataSource$find2 === void 0 ? void 0 : (_dataSource$find2$dat = _dataSource$find2[dataSourceAliasChildren]) === null || _dataSource$find2$dat === void 0 ? void 0 : _dataSource$find2$dat.map(function (item) {
|
57869
|
-
return item
|
57914
|
+
return getDataSourceValue(item);
|
57870
57915
|
})) !== null && _dataSource$find$data2 !== void 0 ? _dataSource$find$data2 : [];
|
57871
57916
|
return valueItem.length !== 0 && valueItem.length < dataSourceValueItem.length;
|
57872
57917
|
}; // 获取 value 对应的 checkbox 选中状态
|
@@ -57878,7 +57923,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57878
57923
|
var values = (_value$find$valueAlia2 = value === null || value === void 0 ? void 0 : (_value$find2 = value.find(function (item) {
|
57879
57924
|
return item[valueAliasKey] === key;
|
57880
57925
|
})) === null || _value$find2 === void 0 ? void 0 : _value$find2[valueAliasValue]) !== null && _value$find$valueAlia2 !== void 0 ? _value$find$valueAlia2 : [];
|
57881
|
-
return values === null || values === void 0 ? void 0 : values.includes(valueItem
|
57926
|
+
return values === null || values === void 0 ? void 0 : values.includes(getDataSourceValue(valueItem));
|
57882
57927
|
}; // value 对应的 checkbox 状态修改
|
57883
57928
|
|
57884
57929
|
|
@@ -57896,14 +57941,14 @@ var SelectGroup = function SelectGroup(props) {
|
|
57896
57941
|
var _activeKeyItem$valueA, _activeKeyItem, _activeKeyItem2;
|
57897
57942
|
|
57898
57943
|
var keyValues = (_activeKeyItem$valueA = (_activeKeyItem = activeKeyItem) === null || _activeKeyItem === void 0 ? void 0 : _activeKeyItem[valueAliasValue]) !== null && _activeKeyItem$valueA !== void 0 ? _activeKeyItem$valueA : [];
|
57899
|
-
keyValues.push(valueItem
|
57944
|
+
keyValues.push(getDataSourceValue(valueItem));
|
57900
57945
|
var newKeyValues = Array.from(new Set(keyValues));
|
57901
57946
|
|
57902
57947
|
if (!((_activeKeyItem2 = activeKeyItem) === null || _activeKeyItem2 === void 0 ? void 0 : _activeKeyItem2[valueAliasKey])) {
|
57903
57948
|
var dataSourceActiveKeyItem = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_4___default()(dataSource === null || dataSource === void 0 ? void 0 : dataSource.find(function (item) {
|
57904
|
-
return item
|
57949
|
+
return getDataSourceValue(item) === key;
|
57905
57950
|
}));
|
57906
|
-
activeKeyItem = _defineProperty({}, valueAliasKey, dataSourceActiveKeyItem
|
57951
|
+
activeKeyItem = _defineProperty({}, valueAliasKey, getDataSourceValue(dataSourceActiveKeyItem));
|
57907
57952
|
}
|
57908
57953
|
|
57909
57954
|
activeKeyItem[valueAliasValue] = newKeyValues;
|
@@ -57914,15 +57959,15 @@ var SelectGroup = function SelectGroup(props) {
|
|
57914
57959
|
var _activeKeyItem$valueA2, _activeKeyItem4, _activeKeyItem5;
|
57915
57960
|
|
57916
57961
|
var _keyValues = ((_activeKeyItem$valueA2 = (_activeKeyItem4 = activeKeyItem) === null || _activeKeyItem4 === void 0 ? void 0 : _activeKeyItem4[valueAliasValue]) !== null && _activeKeyItem$valueA2 !== void 0 ? _activeKeyItem$valueA2 : []).filter(function (item) {
|
57917
|
-
return item !== valueItem
|
57962
|
+
return item !== getDataSourceValue(valueItem);
|
57918
57963
|
});
|
57919
57964
|
|
57920
57965
|
if (!((_activeKeyItem5 = activeKeyItem) === null || _activeKeyItem5 === void 0 ? void 0 : _activeKeyItem5[valueAliasKey])) {
|
57921
57966
|
var _dataSourceActiveKeyItem = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_4___default()(dataSource === null || dataSource === void 0 ? void 0 : dataSource.find(function (item) {
|
57922
|
-
return item
|
57967
|
+
return getDataSourceValue(item) === key;
|
57923
57968
|
}));
|
57924
57969
|
|
57925
|
-
activeKeyItem = _defineProperty({}, valueAliasKey, _dataSourceActiveKeyItem
|
57970
|
+
activeKeyItem = _defineProperty({}, valueAliasKey, getDataSourceValue(_dataSourceActiveKeyItem));
|
57926
57971
|
}
|
57927
57972
|
|
57928
57973
|
if (_keyValues.length > 0) {
|
@@ -57968,7 +58013,7 @@ var SelectGroup = function SelectGroup(props) {
|
|
57968
58013
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(CheckboxItem, {
|
57969
58014
|
className: cls({
|
57970
58015
|
checkbox: true,
|
57971
|
-
'checkbox-active': item
|
58016
|
+
'checkbox-active': getDataSourceValue(item) === activeKey
|
57972
58017
|
}),
|
57973
58018
|
key: index,
|
57974
58019
|
checked: hasChecked(item),
|
@@ -57988,8 +58033,8 @@ var SelectGroup = function SelectGroup(props) {
|
|
57988
58033
|
className: cls('checkbox-before-icon'),
|
57989
58034
|
size: "small"
|
57990
58035
|
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.Ellipsis, {
|
57991
|
-
tooltip: item
|
57992
|
-
}, item
|
58036
|
+
tooltip: getDataSourceLabel(item)
|
58037
|
+
}, getDataSourceLabel(item))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_teamix_icon__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
57993
58038
|
type: "right-line",
|
57994
58039
|
className: cls('checkbox-after-icon'),
|
57995
58040
|
size: "small"
|
@@ -58010,8 +58055,8 @@ var SelectGroup = function SelectGroup(props) {
|
|
58010
58055
|
onValueItemChange(activeKey, item, status);
|
58011
58056
|
}
|
58012
58057
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.Ellipsis, {
|
58013
|
-
tooltip: item
|
58014
|
-
}, item
|
58058
|
+
tooltip: getDataSourceLabel(item)
|
58059
|
+
}, getDataSourceLabel(item)));
|
58015
58060
|
}))), (!dataSource || dataSource.length === 0) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement("div", {
|
58016
58061
|
className: cls('no-data')
|
58017
58062
|
}, (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.getMessage)('noData'))), (showFooter || renderFooter) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_0__.Divider, {
|
@@ -58768,8 +58813,9 @@ var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
|
|
58768
58813
|
tooltipLabel = props.tooltipLabel,
|
58769
58814
|
tooltipIcon = props.tooltipIcon,
|
58770
58815
|
tooltipIconSize = props.tooltipIconSize,
|
58771
|
-
others = _objectWithoutProperties(props, _excluded);
|
58816
|
+
others = _objectWithoutProperties(props, _excluded);
|
58772
58817
|
|
58818
|
+
var proFieldRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); // 注册全局自定义组件
|
58773
58819
|
|
58774
58820
|
var globalProField = (_getGlobalConfig = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.getGlobalConfig)('ProField')) !== null && _getGlobalConfig !== void 0 ? _getGlobalConfig : {};
|
58775
58821
|
registerComponent(globalProField);
|
@@ -58807,10 +58853,11 @@ var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
|
|
58807
58853
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", _objectSpread({
|
58808
58854
|
className: classnames__WEBPACK_IMPORTED_MODULE_1___default()((_cls = {
|
58809
58855
|
'teamix-pro-field': true
|
58810
|
-
}, _defineProperty(_cls, "teamix-pro-field-".concat(type === null || type === void 0 ? void 0 : type.toLowerCase()), true), _defineProperty(_cls, 'teamix-pro-field-compact', layout === 'compact'), _defineProperty(_cls, (_transparentBase$clas = transparentBase.className) !== null && _transparentBase$clas !== void 0 ? _transparentBase$clas : '', true), _defineProperty(_cls, 'teamix-pro-field-tooltip', tooltip), _cls))
|
58856
|
+
}, _defineProperty(_cls, "teamix-pro-field-".concat(type === null || type === void 0 ? void 0 : type.toLowerCase()), true), _defineProperty(_cls, 'teamix-pro-field-compact', layout === 'compact'), _defineProperty(_cls, (_transparentBase$clas = transparentBase.className) !== null && _transparentBase$clas !== void 0 ? _transparentBase$clas : '', true), _defineProperty(_cls, 'teamix-pro-field-tooltip', tooltip), _cls)),
|
58857
|
+
ref: proFieldRef
|
58811
58858
|
}, (0,_utils__WEBPACK_IMPORTED_MODULE_24__/* .hasProps */ .s_)({
|
58812
58859
|
style: transparentBase === null || transparentBase === void 0 ? void 0 : transparentBase.style
|
58813
|
-
})), renderField(type, newProps, ref), !!tooltip && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.LabelIconTip, {
|
58860
|
+
})), renderField(type, newProps, ref, proFieldRef), !!tooltip && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.LabelIconTip, {
|
58814
58861
|
label: tooltipLabel,
|
58815
58862
|
tooltip: tooltip,
|
58816
58863
|
icon: tooltipIcon,
|
@@ -58818,10 +58865,18 @@ var ProField = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().forward
|
|
58818
58865
|
}));
|
58819
58866
|
});
|
58820
58867
|
|
58821
|
-
var renderField = function renderField(type, props, ref) {
|
58868
|
+
var renderField = function renderField(type, props, ref, fieldRef) {
|
58822
58869
|
var allComponents = _objectSpread(_objectSpread({}, innerComponents), externalComponents);
|
58823
58870
|
|
58824
58871
|
var Component = allComponents[type === null || type === void 0 ? void 0 : type.toLowerCase()] || _components_FieldText__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z;
|
58872
|
+
|
58873
|
+
if ((type === null || type === void 0 ? void 0 : type.toLowerCase()) === 'selectgroup') {
|
58874
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _objectSpread(_objectSpread({}, props), {}, {
|
58875
|
+
ref: ref,
|
58876
|
+
fieldRef: fieldRef
|
58877
|
+
}));
|
58878
|
+
}
|
58879
|
+
|
58825
58880
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, _objectSpread(_objectSpread({}, props), {}, {
|
58826
58881
|
ref: ref
|
58827
58882
|
}));
|
@@ -63195,7 +63250,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
63195
63250
|
|
63196
63251
|
// 初始化Search组件,内置部分属性
|
63197
63252
|
var initializeSearch = function initializeSearch(schema) {
|
63198
|
-
var searchName;
|
63253
|
+
var searchName = '';
|
63199
63254
|
var initializedSchema = schema.map(function (item) {
|
63200
63255
|
if (item.component === 'Search') {
|
63201
63256
|
searchName = item.name;
|
@@ -63264,6 +63319,13 @@ var SimpleFilter = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(func
|
|
63264
63319
|
onChange == null ? void 0 : onChange(values, name, value);
|
63265
63320
|
}
|
63266
63321
|
}, [searchName, searchValue.current]);
|
63322
|
+
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
63323
|
+
var _props$form$initialVa, _props$form$initialVa2;
|
63324
|
+
|
63325
|
+
// 处理Search组件,缓存input的默认值
|
63326
|
+
var searchDefaultValue = (_props$form$initialVa = props.form.initialValues) == null ? void 0 : (_props$form$initialVa2 = _props$form$initialVa[searchName]) == null ? void 0 : _props$form$initialVa2[1];
|
63327
|
+
searchValue.current = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.isValid)(searchDefaultValue) ? searchDefaultValue : '';
|
63328
|
+
}, []);
|
63267
63329
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ProForm__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, _extends({}, otherProps, {
|
63268
63330
|
className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(prefixCls, props.className),
|
63269
63331
|
schema: simpleSchema,
|
@@ -66278,7 +66340,7 @@ _teamix_icon__WEBPACK_IMPORTED_MODULE_14__/* ["default"].setConfig */ .Z.setConf
|
|
66278
66340
|
// export * from './sidebar';
|
66279
66341
|
|
66280
66342
|
|
66281
|
-
var version = '1.2.
|
66343
|
+
var version = '1.2.32';
|
66282
66344
|
|
66283
66345
|
|
66284
66346
|
/***/ }),
|
@@ -66408,7 +66470,7 @@ var ProInfoGroup = function ProInfoGroup(props) {
|
|
66408
66470
|
/* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33049);
|
66409
66471
|
/* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_6__);
|
66410
66472
|
/* harmony import */ var _actions__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(28758);
|
66411
|
-
var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context"];
|
66473
|
+
var _excluded = ["type", "value", "render", "infoItem", "record", "actionRef", "dataSource", "context", "props"];
|
66412
66474
|
|
66413
66475
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
66414
66476
|
|
@@ -66442,6 +66504,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
66442
66504
|
actionRef = props.actionRef,
|
66443
66505
|
dataSource = props.dataSource,
|
66444
66506
|
context = props.context,
|
66507
|
+
fieldProps = props.props,
|
66445
66508
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
66446
66509
|
|
66447
66510
|
var dataIndex = infoItem.dataIndex,
|
@@ -66455,7 +66518,8 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
66455
66518
|
_infoItem$successMess = infoItem.successMessage,
|
66456
66519
|
successMessage = _infoItem$successMess === void 0 ? 'success' : _infoItem$successMess,
|
66457
66520
|
actions = infoItem.actions,
|
66458
|
-
extra = infoItem.extra
|
66521
|
+
extra = infoItem.extra,
|
66522
|
+
valueType = infoItem.valueType; // 获取处理过的 render
|
66459
66523
|
|
66460
66524
|
var getRender = function getRender() {
|
66461
66525
|
var _ref, _ref2;
|
@@ -66467,7 +66531,31 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
66467
66531
|
}
|
66468
66532
|
|
66469
66533
|
var newRender = processBuriedPoint((_ref = processRenderFunction((_ref2 = render) != null ? _ref2 : {}, value, record)) != null ? _ref : {}, value, record);
|
66534
|
+
|
66535
|
+
if (valueType === 'selectGroup') {
|
66536
|
+
newRender = _objectSpread(_objectSpread({
|
66537
|
+
maxShowNumber: 'auto',
|
66538
|
+
foldText: 'more'
|
66539
|
+
}, newRender), {}, {
|
66540
|
+
ellipsis: false
|
66541
|
+
});
|
66542
|
+
}
|
66543
|
+
|
66470
66544
|
return newRender;
|
66545
|
+
};
|
66546
|
+
|
66547
|
+
var getFieldProps = function getFieldProps() {
|
66548
|
+
if (valueType === 'selectGroup') {
|
66549
|
+
return _objectSpread({
|
66550
|
+
valueAlias: {
|
66551
|
+
value: 'TagValue',
|
66552
|
+
key: 'TagKey'
|
66553
|
+
},
|
66554
|
+
layout: 'compact'
|
66555
|
+
}, fieldProps);
|
66556
|
+
}
|
66557
|
+
|
66558
|
+
return fieldProps;
|
66471
66559
|
}; // 获取处理过的 dataSource
|
66472
66560
|
|
66473
66561
|
|
@@ -66664,7 +66752,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
66664
66752
|
value: value,
|
66665
66753
|
render: getRender(),
|
66666
66754
|
dataSource: getDataSource()
|
66667
|
-
}, others)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_teamix_pop_confirm__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
66755
|
+
}, others, getFieldProps())), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_4___default().createElement(_teamix_pop_confirm__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .Z, {
|
66668
66756
|
visible: popConfirmVisible,
|
66669
66757
|
content: renderContent(),
|
66670
66758
|
triggerType: "click",
|
@@ -66696,7 +66784,7 @@ var InfoValueItem = function InfoValueItem(props) {
|
|
66696
66784
|
value: value,
|
66697
66785
|
render: getRender(),
|
66698
66786
|
dataSource: getDataSource()
|
66699
|
-
}, others)), renderAction(), extra && extra);
|
66787
|
+
}, others, getFieldProps())), renderAction(), extra && extra);
|
66700
66788
|
};
|
66701
66789
|
|
66702
66790
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (InfoValueItem);
|
@@ -66755,7 +66843,7 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
66755
66843
|
className: cls('value')
|
66756
66844
|
}, loading && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
66757
66845
|
className: cls('base-skeleton-box')
|
66758
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(___WEBPACK_IMPORTED_MODULE_1__.ProSkeletonRaw.Info.Item, null)), !loading &&
|
66846
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(___WEBPACK_IMPORTED_MODULE_1__.ProSkeletonRaw.Info.Item, null)), !loading && value)));
|
66759
66847
|
}
|
66760
66848
|
|
66761
66849
|
if (headerInfoLayout) {
|
@@ -66763,7 +66851,9 @@ var ProInfoItem = function ProInfoItem(prop) {
|
|
66763
66851
|
labelGutter = _headerInfoLayout$lab === void 0 ? '16px' : _headerInfoLayout$lab;
|
66764
66852
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
66765
66853
|
className: cls()
|
66766
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Row,
|
66854
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(Row, {
|
66855
|
+
className: cls('header-row')
|
66856
|
+
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement("div", {
|
66767
66857
|
className: cls('header-label')
|
66768
66858
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_3___default().createElement(_teamix_utils__WEBPACK_IMPORTED_MODULE_2__.LabelIconTip, {
|
66769
66859
|
label: label,
|
@@ -66877,7 +66967,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
66877
66967
|
infoItem: item,
|
66878
66968
|
record: dataSource != null ? dataSource : result,
|
66879
66969
|
actionRef: actionRef,
|
66880
|
-
context: context
|
66970
|
+
context: context,
|
66971
|
+
props: item.props
|
66881
66972
|
}),
|
66882
66973
|
baseInfoLayout: getFormItemLayout((_item$colSpan = item == null ? void 0 : item.colSpan) != null ? _item$colSpan : 0),
|
66883
66974
|
tooltip: item.tooltip,
|
@@ -66888,7 +66979,8 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
66888
66979
|
|
66889
66980
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement((react__WEBPACK_IMPORTED_MODULE_1___default().Fragment), null, (size == null ? void 0 : size.width) && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_1___default().createElement(Row, {
|
66890
66981
|
wrap: true,
|
66891
|
-
className: "teamix-pro-info-content-row"
|
66982
|
+
className: "teamix-pro-info-content-row",
|
66983
|
+
gutter: 20
|
66892
66984
|
}, renderContent()));
|
66893
66985
|
};
|
66894
66986
|
|
@@ -66964,7 +67056,8 @@ var ProHeaderInfo = function ProHeaderInfo(props) {
|
|
66964
67056
|
dataSource: item.dataSource,
|
66965
67057
|
infoItem: item,
|
66966
67058
|
record: dataSource != null ? dataSource : result,
|
66967
|
-
actionRef: actionRef
|
67059
|
+
actionRef: actionRef,
|
67060
|
+
props: item.props
|
66968
67061
|
}),
|
66969
67062
|
headerInfoLayout: layout != null ? layout : defaultLayout,
|
66970
67063
|
tooltip: item.tooltip,
|
@@ -67054,7 +67147,8 @@ var ProTableInfo = function ProTableInfo(props) {
|
|
67054
67147
|
dataSource: item.dataSource,
|
67055
67148
|
infoItem: item,
|
67056
67149
|
record: dataSource != null ? dataSource : result,
|
67057
|
-
actionRef: actionRef
|
67150
|
+
actionRef: actionRef,
|
67151
|
+
props: item.props
|
67058
67152
|
});
|
67059
67153
|
};
|
67060
67154
|
|
@@ -70149,10 +70243,10 @@ var Filter = function Filter(props) {
|
|
70149
70243
|
setVisible = _useState2[1];
|
70150
70244
|
|
70151
70245
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
70152
|
-
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3;
|
70246
|
+
var _actionRef$current$ge, _actionRef$current, _actionRef$current$ge2, _actionRef$current$ge3, _actionRef$current$ge4;
|
70153
70247
|
|
70154
70248
|
// 从全局状态中读取上次存储的条件
|
70155
|
-
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) == null ? void 0 : _actionRef$current.getState == null ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState().filterRules) == null ? void 0 : (_actionRef$current$
|
70249
|
+
var rules = (_actionRef$current$ge = (_actionRef$current = actionRef.current) == null ? void 0 : _actionRef$current.getState == null ? void 0 : (_actionRef$current$ge2 = _actionRef$current.getState()) == null ? void 0 : (_actionRef$current$ge3 = _actionRef$current$ge2.filterRules) == null ? void 0 : (_actionRef$current$ge4 = _actionRef$current$ge3[column.dataIndex]) == null ? void 0 : _actionRef$current$ge4.rules) != null ? _actionRef$current$ge : [];
|
70156
70250
|
setSelected(rules);
|
70157
70251
|
}, []); // 获取过滤项
|
70158
70252
|
|
@@ -70268,7 +70362,7 @@ var Filter = function Filter(props) {
|
|
70268
70362
|
btn: true
|
70269
70363
|
}),
|
70270
70364
|
onClick: function onClick() {
|
70271
|
-
var _actionRef$current2, _actionRef$current$
|
70365
|
+
var _actionRef$current2, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current4, _objectSpread2;
|
70272
70366
|
|
70273
70367
|
(_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.filterDataSource == null ? void 0 : _actionRef$current2.filterDataSource(column.dataIndex); // 先获取此列的param
|
70274
70368
|
|
@@ -70281,7 +70375,7 @@ var Filter = function Filter(props) {
|
|
70281
70375
|
} // 需要带上其他所有的信息
|
70282
70376
|
|
70283
70377
|
|
70284
|
-
var rules = (_actionRef$current$
|
70378
|
+
var rules = (_actionRef$current$ge5 = (_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.getState == null ? void 0 : (_actionRef$current3$g = _actionRef$current3.getState()) == null ? void 0 : _actionRef$current3$g.filterRules) != null ? _actionRef$current$ge5 : {}; // 再设置所有的列筛选状态
|
70285
70379
|
|
70286
70380
|
(_actionRef$current4 = actionRef.current) == null ? void 0 : _actionRef$current4.setFilterRules == null ? void 0 : _actionRef$current4.setFilterRules(_objectSpread(_objectSpread({}, rules), {}, (_objectSpread2 = {}, _objectSpread2[column.dataIndex] = {
|
70287
70381
|
rules: selected,
|
@@ -70314,10 +70408,10 @@ var Filter = function Filter(props) {
|
|
70314
70408
|
btn: true
|
70315
70409
|
}),
|
70316
70410
|
onClick: function onClick() {
|
70317
|
-
var _actionRef$current$
|
70411
|
+
var _actionRef$current$ge6, _actionRef$current9, _actionRef$current9$g, _actionRef$current10, _objectSpread3, _actionRef$current11;
|
70318
70412
|
|
70319
70413
|
setSelected([]);
|
70320
|
-
var rules = (_actionRef$current$
|
70414
|
+
var rules = (_actionRef$current$ge6 = (_actionRef$current9 = actionRef.current) == null ? void 0 : _actionRef$current9.getState == null ? void 0 : (_actionRef$current9$g = _actionRef$current9.getState()) == null ? void 0 : _actionRef$current9$g.filterRules) != null ? _actionRef$current$ge6 : {};
|
70321
70415
|
(_actionRef$current10 = actionRef.current) == null ? void 0 : _actionRef$current10.setFilterRules == null ? void 0 : _actionRef$current10.setFilterRules(_objectSpread(_objectSpread({}, rules), {}, (_objectSpread3 = {}, _objectSpread3[column.dataIndex] = {
|
70322
70416
|
rules: [],
|
70323
70417
|
params: ''
|
@@ -70423,8 +70517,10 @@ var Layout = function Layout(props) {
|
|
70423
70517
|
|
70424
70518
|
|
70425
70519
|
var renderQueryFilter = function renderQueryFilter() {
|
70426
|
-
|
70427
|
-
|
70520
|
+
var _dataFilter$schema;
|
70521
|
+
|
70522
|
+
if (dataFilter != null && (_dataFilter$schema = dataFilter.schema) != null && _dataFilter$schema.length) {
|
70523
|
+
var _dataFilter$schema2;
|
70428
70524
|
|
70429
70525
|
if ( /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(dataFilter == null ? void 0 : dataFilter.content)) {
|
70430
70526
|
// 自定义渲染内容
|
@@ -70452,7 +70548,7 @@ var Layout = function Layout(props) {
|
|
70452
70548
|
actionRef: actionRef
|
70453
70549
|
}, otherProps)))
|
70454
70550
|
}, dataFilter));
|
70455
|
-
} else if ((dataFilter == null ? void 0 : (_dataFilter$
|
70551
|
+
} else if ((dataFilter == null ? void 0 : (_dataFilter$schema2 = dataFilter.schema) == null ? void 0 : _dataFilter$schema2.length) >= 0) {
|
70456
70552
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_form__WEBPACK_IMPORTED_MODULE_3__/* .QueryFilter */ .ti, _extends({
|
70457
70553
|
formRef: dataFilterFormRef,
|
70458
70554
|
onExpand: function onExpand(expand) {
|
@@ -70478,6 +70574,19 @@ var Layout = function Layout(props) {
|
|
70478
70574
|
}, otherProps)))
|
70479
70575
|
}, dataFilter));
|
70480
70576
|
}
|
70577
|
+
} else if (mainAction) {
|
70578
|
+
// 没传 dataFilter 但是传了 mainAction
|
70579
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_form__WEBPACK_IMPORTED_MODULE_3__/* .QueryFilterLayout */ .rx, {
|
70580
|
+
className: "mb8",
|
70581
|
+
addonBefore: renderMainAction(),
|
70582
|
+
addonAfter: /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, extra && !header && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_QuickAction__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z, {
|
70583
|
+
actionRef: actionRef,
|
70584
|
+
quickAction: extra,
|
70585
|
+
rowSelection: rowSelection
|
70586
|
+
}), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_ToolBar__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z, _extends({
|
70587
|
+
actionRef: actionRef
|
70588
|
+
}, otherProps)))
|
70589
|
+
});
|
70481
70590
|
}
|
70482
70591
|
}; // 区域组合渲染
|
70483
70592
|
|
@@ -71444,25 +71553,21 @@ var FullScreen = function FullScreen(props) {
|
|
71444
71553
|
normalDataFilterForm = _actionRef$current.normalDataFilterForm,
|
71445
71554
|
fullscreenDataFilterForm = _actionRef$current.fullscreenDataFilterForm;
|
71446
71555
|
|
71447
|
-
function closeByESC(e) {
|
71556
|
+
var closeByESC = function closeByESC(e) {
|
71448
71557
|
if (visible && e.code === 'Escape') {
|
71449
|
-
var _actionRef$current2
|
71558
|
+
var _actionRef$current2;
|
71450
71559
|
|
71451
|
-
actionRef == null ? void 0 : (_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.
|
71452
|
-
actionRef == null ? void 0 : (_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.fullScreen == null ? void 0 : _actionRef$current3.fullScreen();
|
71560
|
+
actionRef == null ? void 0 : (_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.fullScreen == null ? void 0 : _actionRef$current2.fullScreen();
|
71453
71561
|
}
|
71454
|
-
} // 监听esc按钮
|
71562
|
+
}; // 监听esc按钮
|
71455
71563
|
|
71456
71564
|
|
71457
71565
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
71458
|
-
var _actionRef$current4;
|
71459
|
-
|
71460
|
-
actionRef == null ? void 0 : (_actionRef$current4 = actionRef.current) == null ? void 0 : _actionRef$current4.setFullScreenState == null ? void 0 : _actionRef$current4.setFullScreenState(visible);
|
71461
71566
|
window.addEventListener('keydown', closeByESC);
|
71462
71567
|
return function () {
|
71463
71568
|
window.removeEventListener('keydown', closeByESC);
|
71464
71569
|
};
|
71465
|
-
}, [visible]);
|
71570
|
+
}, [visible, actionRef]);
|
71466
71571
|
|
71467
71572
|
var afterClose = function afterClose() {
|
71468
71573
|
normalDataFilterForm == null ? void 0 : normalDataFilterForm.setValues(fullscreenDataFilterForm.values);
|
@@ -71500,9 +71605,9 @@ var FullScreen = function FullScreen(props) {
|
|
71500
71605
|
zIndex: 999
|
71501
71606
|
},
|
71502
71607
|
onRequestClose: function onRequestClose() {
|
71503
|
-
var _actionRef$
|
71608
|
+
var _actionRef$current3;
|
71504
71609
|
|
71505
|
-
actionRef == null ? void 0 : (_actionRef$
|
71610
|
+
actionRef == null ? void 0 : (_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.fullScreen == null ? void 0 : _actionRef$current3.fullScreen();
|
71506
71611
|
}
|
71507
71612
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
71508
71613
|
className: "teamix-pro-table-full-screen"
|
@@ -71901,7 +72006,22 @@ var ProTable = function ProTable(props) {
|
|
71901
72006
|
|
71902
72007
|
var _useState10 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(true),
|
71903
72008
|
showLoading = _useState10[0],
|
71904
|
-
setShowLoading = _useState10[1]; //
|
72009
|
+
setShowLoading = _useState10[1]; // 存储能够被 on 监听到的 ProTable 状态
|
72010
|
+
// 因为只做存储用。不需要更新视图以及需要同步更改。所以不使用 setState 更新
|
72011
|
+
|
72012
|
+
|
72013
|
+
var _useState11 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
72014
|
+
fullScreenState: false,
|
72015
|
+
filterRules: {},
|
72016
|
+
filterColumns: []
|
72017
|
+
}),
|
72018
|
+
actionRefState = _useState11[0]; // 存储 on 监听事件
|
72019
|
+
|
72020
|
+
|
72021
|
+
var _useState12 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)({
|
72022
|
+
fullScreenState: {}
|
72023
|
+
}),
|
72024
|
+
actionRefCallback = _useState12[0]; // 存储定时器 id
|
71905
72025
|
|
71906
72026
|
|
71907
72027
|
var autoRefreshTimerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(); // 获取header高度,用作全屏吸底吸底高度计算
|
@@ -71925,14 +72045,14 @@ var ProTable = function ProTable(props) {
|
|
71925
72045
|
}; // header 区域高度。用作全屏计算吸顶吸底高度。默认不做计算
|
71926
72046
|
|
71927
72047
|
|
71928
|
-
var
|
71929
|
-
headerHeight =
|
71930
|
-
setHeaderHeight =
|
72048
|
+
var _useState13 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(0),
|
72049
|
+
headerHeight = _useState13[0],
|
72050
|
+
setHeaderHeight = _useState13[1]; // 全屏显示 className
|
71931
72051
|
|
71932
72052
|
|
71933
|
-
var
|
71934
|
-
fullscreenState =
|
71935
|
-
setFullscreenState =
|
72053
|
+
var _useState14 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
72054
|
+
fullscreenState = _useState14[0],
|
72055
|
+
setFullscreenState = _useState14[1]; // 非全屏状态下的
|
71936
72056
|
|
71937
72057
|
|
71938
72058
|
var normalDataFilterFormRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
@@ -71943,9 +72063,9 @@ var ProTable = function ProTable(props) {
|
|
71943
72063
|
var dataFilterFormRef = !fullscreenState ? normalDataFilterFormRef : fullscreenDataFilterFormRef;
|
71944
72064
|
var dataFilterForm = dataFilterFormRef.current; // 整个内容区是否超过一屏。用于表格在非全屏模式下的吸底
|
71945
72065
|
|
71946
|
-
var
|
71947
|
-
footerSuctionState =
|
71948
|
-
setFooterSuctionState =
|
72066
|
+
var _useState15 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
72067
|
+
footerSuctionState = _useState15[0],
|
72068
|
+
setFooterSuctionState = _useState15[1]; // TODO 获取内容区是否超出一屏(暂时仅支持全家桶)
|
71949
72069
|
|
71950
72070
|
|
71951
72071
|
var getFooterSuctionState = function getFooterSuctionState() {
|
@@ -72069,20 +72189,54 @@ var ProTable = function ProTable(props) {
|
|
72069
72189
|
if (propsDataSource) {
|
72070
72190
|
setData(propsDataSource);
|
72071
72191
|
}
|
72072
|
-
}, [propsDataSource]); //
|
72192
|
+
}, [propsDataSource]); // 初始化 ActionRef。
|
72193
|
+
|
72194
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .initActionRef */ .rf)(actionRef, {
|
72195
|
+
getState: function getState() {
|
72196
|
+
return actionRefState;
|
72197
|
+
},
|
72198
|
+
getCallback: function getCallback() {
|
72199
|
+
return actionRefCallback;
|
72200
|
+
},
|
72201
|
+
setState: function setState(key, value) {
|
72202
|
+
actionRefState[key] = value;
|
72203
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .actionRefUseStateOn */ .So)(actionRefCallback, key, value);
|
72204
|
+
},
|
72205
|
+
on: function on(fun, state, name) {
|
72206
|
+
if (!actionRefCallback[state]) {
|
72207
|
+
actionRefCallback[state] = {};
|
72208
|
+
}
|
72209
|
+
|
72210
|
+
actionRefCallback[state][name] = fun;
|
72211
|
+
},
|
72212
|
+
off: function off(name) {
|
72213
|
+
actionRefCallback = Object.fromEntries(Object.entries(actionRefCallback).map(function (_ref2) {
|
72214
|
+
var k = _ref2[0],
|
72215
|
+
v = _ref2[1];
|
72216
|
+
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref3) {
|
72217
|
+
var k = _ref3[0];
|
72218
|
+
return k !== name;
|
72219
|
+
}));
|
72220
|
+
return [k, filterV];
|
72221
|
+
}));
|
72222
|
+
}
|
72223
|
+
}); // 绑定 Actions
|
72073
72224
|
|
72074
72225
|
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .useActionType */ .tx)(actionRef, {
|
72075
72226
|
fullScreen: function fullScreen() {
|
72227
|
+
var _actionRef$current2;
|
72228
|
+
|
72076
72229
|
var state = !fullscreenState; // 全屏时需要重新计算header高度
|
72077
72230
|
|
72078
72231
|
getHeaderHeight().then(function (height) {
|
72079
72232
|
setHeaderHeight(height);
|
72080
72233
|
});
|
72081
72234
|
setFullscreenState(state);
|
72235
|
+
actionRef == null ? void 0 : (_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.setState == null ? void 0 : _actionRef$current2.setState('fullScreenState', state);
|
72082
72236
|
return state;
|
72083
72237
|
},
|
72084
72238
|
setColumn: function setColumn(newColumns, update) {
|
72085
|
-
var _actionRef$
|
72239
|
+
var _actionRef$current3;
|
72086
72240
|
|
72087
72241
|
if (update === void 0) {
|
72088
72242
|
update = true;
|
@@ -72090,7 +72244,7 @@ var ProTable = function ProTable(props) {
|
|
72090
72244
|
|
72091
72245
|
var columns = processColumns(newColumns, propsColumns);
|
72092
72246
|
setFilteredColumns(columns);
|
72093
|
-
(_actionRef$
|
72247
|
+
(_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.setState == null ? void 0 : _actionRef$current3.setState('filterColumns', columns);
|
72094
72248
|
|
72095
72249
|
if (update) {
|
72096
72250
|
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .emit */ .j8)('refreshFilterState', newColumns);
|
@@ -72115,11 +72269,11 @@ var ProTable = function ProTable(props) {
|
|
72115
72269
|
_request(params);
|
72116
72270
|
},
|
72117
72271
|
reset: function reset() {
|
72118
|
-
var _actionRef$
|
72272
|
+
var _actionRef$current4, _dataFilterForm, _request2;
|
72119
72273
|
|
72120
72274
|
(propsDataFilter == null ? void 0 : propsDataFilter.onReset) && (propsDataFilter == null ? void 0 : propsDataFilter.onReset()); // 清空列过滤参数
|
72121
72275
|
|
72122
|
-
(_actionRef$
|
72276
|
+
(_actionRef$current4 = actionRef.current) == null ? void 0 : _actionRef$current4.setFilterRules == null ? void 0 : _actionRef$current4.setFilterRules({});
|
72123
72277
|
(_dataFilterForm = dataFilterForm) == null ? void 0 : _dataFilterForm.reset();
|
72124
72278
|
setCurrentPage(1);
|
72125
72279
|
|
@@ -72177,12 +72331,12 @@ var ProTable = function ProTable(props) {
|
|
72177
72331
|
|
72178
72332
|
|
72179
72333
|
var getData = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_4__.useRequest)(function (params) {
|
72180
|
-
var
|
72334
|
+
var _ref4;
|
72181
72335
|
|
72182
|
-
return
|
72336
|
+
return _ref4 = {
|
72183
72337
|
url: url,
|
72184
72338
|
method: method
|
72185
|
-
},
|
72339
|
+
}, _ref4[requestDataKey] = params, _ref4;
|
72186
72340
|
}, {
|
72187
72341
|
// 使用 request 方法代替 fetch
|
72188
72342
|
requestMethod: function requestMethod(params) {
|
@@ -72236,7 +72390,7 @@ var ProTable = function ProTable(props) {
|
|
72236
72390
|
}); // 请求函数
|
72237
72391
|
|
72238
72392
|
function _request(params, noLoading) {
|
72239
|
-
var _dataFilterForm2, _actionRef$current$ge, _actionRef$
|
72393
|
+
var _dataFilterForm2, _actionRef$current$ge, _actionRef$current5, _objectSpread2;
|
72240
72394
|
|
72241
72395
|
// 如果没有传 url 且没有 customRequest,直接返回
|
72242
72396
|
if (!url && !customRequest) {
|
@@ -72251,7 +72405,7 @@ var ProTable = function ProTable(props) {
|
|
72251
72405
|
|
72252
72406
|
var dataFilterParams = toJS((_dataFilterForm2 = dataFilterForm) == null ? void 0 : _dataFilterForm2.values); // 列过滤请求参数
|
72253
72407
|
|
72254
|
-
var columnsFilterParams = (_actionRef$current$ge = (_actionRef$
|
72408
|
+
var columnsFilterParams = (_actionRef$current$ge = (_actionRef$current5 = actionRef.current) == null ? void 0 : _actionRef$current5.getFilterRules == null ? void 0 : _actionRef$current5.getFilterRules()) != null ? _actionRef$current$ge : {}; // 格式化后的请求参数
|
72255
72409
|
|
72256
72410
|
var requestData = formatParams(_objectSpread(_objectSpread({}, !showPagination ? _objectSpread(_objectSpread(_objectSpread(_objectSpread({}, dataFilterParams), propsParams), sortParams), columnsFilterParams) : _objectSpread(_objectSpread(_objectSpread(_objectSpread((_objectSpread2 = {}, _objectSpread2[targetPageKey] = currentPage, _objectSpread2[targetPageSizeKey] = pageSize, _objectSpread2), dataFilterParams), propsParams), sortParams), columnsFilterParams)), params));
|
72257
72411
|
|
@@ -72300,10 +72454,6 @@ var ProTable = function ProTable(props) {
|
|
72300
72454
|
}
|
72301
72455
|
|
72302
72456
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
72303
|
-
var _dataFilterForm3;
|
72304
|
-
|
72305
|
-
// 初始化 actionRef state、callback 此时 actionRef 已初始化完成
|
72306
|
-
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .initActionRef */ .rf)();
|
72307
72457
|
dataFilterForm = dataFilterFormRef.current; // 监听 浏览器变化 更吸底状态
|
72308
72458
|
|
72309
72459
|
if (footerSuction) {
|
@@ -72314,11 +72464,21 @@ var ProTable = function ProTable(props) {
|
|
72314
72464
|
};
|
72315
72465
|
}
|
72316
72466
|
|
72317
|
-
if (
|
72318
|
-
|
72319
|
-
|
72467
|
+
if (propsDataFilter) {
|
72468
|
+
var _dataFilterForm3;
|
72469
|
+
|
72470
|
+
if (requestWhenMount && (_dataFilterForm3 = dataFilterForm) != null && _dataFilterForm3.id) {
|
72471
|
+
// 在请求发送之前 处理漏斗默认数据
|
72472
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .processDefaultFilter */ .aP)(propsColumns, actionRef, defaultFilterParams);
|
72320
72473
|
|
72321
|
-
|
72474
|
+
_request();
|
72475
|
+
}
|
72476
|
+
} else {
|
72477
|
+
if (requestWhenMount) {
|
72478
|
+
(0,_utils__WEBPACK_IMPORTED_MODULE_7__/* .processDefaultFilter */ .aP)(propsColumns, actionRef, defaultFilterParams);
|
72479
|
+
|
72480
|
+
_request();
|
72481
|
+
}
|
72322
72482
|
}
|
72323
72483
|
|
72324
72484
|
return function () {
|
@@ -72348,11 +72508,11 @@ var ProTable = function ProTable(props) {
|
|
72348
72508
|
mode: 'inline'
|
72349
72509
|
}, propsDataFilter), {}, {
|
72350
72510
|
onFilter: function onFilter(values) {
|
72351
|
-
var _actionRef$
|
72511
|
+
var _actionRef$current6, _request3;
|
72352
72512
|
|
72353
72513
|
(propsDataFilter == null ? void 0 : propsDataFilter.onFilter) && (propsDataFilter == null ? void 0 : propsDataFilter.onFilter(values)); // 搜索变化时,暂时先清空选择
|
72354
72514
|
|
72355
|
-
(_actionRef$
|
72515
|
+
(_actionRef$current6 = actionRef.current) == null ? void 0 : _actionRef$current6.clearRowSelection == null ? void 0 : _actionRef$current6.clearRowSelection();
|
72356
72516
|
setCurrentPage(1);
|
72357
72517
|
|
72358
72518
|
_request((_request3 = {}, _request3[targetPageKey] = 1, _request3));
|
@@ -72449,24 +72609,24 @@ var ProTable = function ProTable(props) {
|
|
72449
72609
|
|
72450
72610
|
var renderFooter = function renderFooter() {
|
72451
72611
|
function onChangePagination(currentPage, params) {
|
72452
|
-
var _actionRef$
|
72612
|
+
var _actionRef$current7, _objectSpread3;
|
72453
72613
|
|
72454
72614
|
if (params === void 0) {
|
72455
72615
|
params = {};
|
72456
72616
|
}
|
72457
72617
|
|
72458
72618
|
// 翻页暂时先清空选择
|
72459
|
-
(_actionRef$
|
72619
|
+
(_actionRef$current7 = actionRef.current) == null ? void 0 : _actionRef$current7.clearRowSelection == null ? void 0 : _actionRef$current7.clearRowSelection();
|
72460
72620
|
setCurrentPage(currentPage);
|
72461
72621
|
|
72462
72622
|
_request(_objectSpread((_objectSpread3 = {}, _objectSpread3[targetPageKey] = currentPage, _objectSpread3), params));
|
72463
72623
|
}
|
72464
72624
|
|
72465
72625
|
function onChangePaginationSize(currentPageSize) {
|
72466
|
-
var _actionRef$
|
72626
|
+
var _actionRef$current8, _request5;
|
72467
72627
|
|
72468
72628
|
// 翻页暂时先清空选择
|
72469
|
-
(_actionRef$
|
72629
|
+
(_actionRef$current8 = actionRef.current) == null ? void 0 : _actionRef$current8.clearRowSelection == null ? void 0 : _actionRef$current8.clearRowSelection();
|
72470
72630
|
setPageSize(currentPageSize);
|
72471
72631
|
setCurrentPage(1);
|
72472
72632
|
|
@@ -72697,7 +72857,7 @@ var renderCell = function renderCell(value, item, index, record, actionRef) {
|
|
72697
72857
|
|
72698
72858
|
if (valueType === 'selectGroup') {
|
72699
72859
|
newRender = _objectSpread(_objectSpread({
|
72700
|
-
maxShowNumber:
|
72860
|
+
maxShowNumber: 'auto',
|
72701
72861
|
foldText: 'more',
|
72702
72862
|
editOnClick: function editOnClick() {},
|
72703
72863
|
edit: true
|
@@ -72940,10 +73100,11 @@ showSkeleton, actionRef) {
|
|
72940
73100
|
|
72941
73101
|
"use strict";
|
72942
73102
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
72943
|
-
/* harmony export */ "
|
73103
|
+
/* harmony export */ "So": () => (/* binding */ actionRefUseStateOn),
|
72944
73104
|
/* harmony export */ "on": () => (/* binding */ on),
|
72945
73105
|
/* harmony export */ "S1": () => (/* binding */ off),
|
72946
73106
|
/* harmony export */ "j8": () => (/* binding */ emit),
|
73107
|
+
/* harmony export */ "rf": () => (/* binding */ initActionRef),
|
72947
73108
|
/* harmony export */ "tx": () => (/* binding */ useActionType),
|
72948
73109
|
/* harmony export */ "Xh": () => (/* binding */ cloneDeep),
|
72949
73110
|
/* harmony export */ "aP": () => (/* binding */ processDefaultFilter)
|
@@ -72957,123 +73118,74 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
72957
73118
|
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; }
|
72958
73119
|
|
72959
73120
|
|
72960
|
-
//
|
72961
|
-
var
|
72962
|
-
fullScreenState: false,
|
72963
|
-
filterRules: {},
|
72964
|
-
filterColumns: []
|
72965
|
-
};
|
73121
|
+
// 所有 ProTable 组件公用一套组件内事件转发机制
|
73122
|
+
var tableCallback = {}; // 组件内对全局状态的更改
|
72966
73123
|
|
72967
|
-
var
|
73124
|
+
var getMutations = function getMutations(actionRef) {
|
73125
|
+
var _actionRef$current2, _actionRef$current2$g;
|
72968
73126
|
|
73127
|
+
return {
|
73128
|
+
setFullScreenState: function setFullScreenState(fullScreenState) {
|
73129
|
+
var _actionRef$current;
|
72969
73130
|
|
72970
|
-
|
72971
|
-
|
72972
|
-
|
72973
|
-
var initCallback = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default()(callback); // 所有 ProTable 组件公用一套组件内事件转发机制
|
72974
|
-
|
72975
|
-
var tableCallback = {}; // 组件内监听事件
|
72976
|
-
// 组件内对全局状态的更改
|
73131
|
+
(_actionRef$current = actionRef.current) == null ? void 0 : _actionRef$current.setState == null ? void 0 : _actionRef$current.setState('fullScreenState', fullScreenState);
|
73132
|
+
},
|
73133
|
+
filterColumns: (_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.getState == null ? void 0 : (_actionRef$current2$g = _actionRef$current2.getState()) == null ? void 0 : _actionRef$current2$g.filterColumns,
|
72977
73134
|
|
72978
|
-
|
72979
|
-
|
72980
|
-
|
72981
|
-
|
72982
|
-
|
72983
|
-
|
72984
|
-
|
73135
|
+
/**
|
73136
|
+
* 设置筛选列规则
|
73137
|
+
* @param rules 规则
|
73138
|
+
* @param dataIndex column.dataIndex
|
73139
|
+
*/
|
73140
|
+
setFilterRules: function setFilterRules(rules) {
|
73141
|
+
var _actionRef$current3;
|
72985
73142
|
|
72986
|
-
|
72987
|
-
|
72988
|
-
}
|
72989
|
-
},
|
72990
|
-
initState: function initState() {
|
72991
|
-
state = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default()(_initState);
|
72992
|
-
},
|
72993
|
-
filterColumns: state.filterColumns,
|
72994
|
-
setFullScreenState: function setFullScreenState(fullScreenState) {
|
72995
|
-
state.fullScreenState = fullScreenState;
|
72996
|
-
useOn('fullScreenState', fullScreenState);
|
72997
|
-
},
|
73143
|
+
(_actionRef$current3 = actionRef.current) == null ? void 0 : _actionRef$current3.setState == null ? void 0 : _actionRef$current3.setState('filterRules', rules);
|
73144
|
+
},
|
72998
73145
|
|
72999
|
-
|
73000
|
-
|
73001
|
-
|
73002
|
-
|
73003
|
-
|
73004
|
-
setFilterRules: function setFilterRules(rules) {
|
73005
|
-
state.filterRules = rules;
|
73006
|
-
},
|
73146
|
+
/**
|
73147
|
+
* 获取筛选规则。为params
|
73148
|
+
*/
|
73149
|
+
getFilterRules: function getFilterRules() {
|
73150
|
+
var _actionRef$current4;
|
73007
73151
|
|
73008
|
-
|
73009
|
-
|
73010
|
-
*/
|
73011
|
-
getFilterRules: function getFilterRules() {
|
73012
|
-
var result = {};
|
73152
|
+
var result = {};
|
73153
|
+
var filterRules = (_actionRef$current4 = actionRef.current) == null ? void 0 : _actionRef$current4.getState == null ? void 0 : _actionRef$current4.getState().filterRules;
|
73013
73154
|
|
73014
|
-
|
73015
|
-
|
73016
|
-
|
73155
|
+
if (filterRules) {
|
73156
|
+
result = Object.entries(filterRules).map(function (_ref) {
|
73157
|
+
var _ref2;
|
73017
73158
|
|
73018
|
-
|
73019
|
-
|
73020
|
-
|
73021
|
-
|
73022
|
-
|
73023
|
-
|
73024
|
-
|
73025
|
-
|
73026
|
-
|
73027
|
-
return result;
|
73028
|
-
},
|
73159
|
+
var k = _ref[0],
|
73160
|
+
v = _ref[1];
|
73161
|
+
return _ref2 = {}, _ref2[k] = v.params, _ref2;
|
73162
|
+
}).reduce(function (acc, cur) {
|
73163
|
+
acc = _objectSpread(_objectSpread({}, acc), cur);
|
73164
|
+
return acc;
|
73165
|
+
}, {});
|
73166
|
+
}
|
73029
73167
|
|
73030
|
-
|
73031
|
-
* 绑定监听函数
|
73032
|
-
* @param fun 监听函数
|
73033
|
-
* @param state 需要监听的state
|
73034
|
-
* @param name 监听名(作为销毁唯一id使用)
|
73035
|
-
*/
|
73036
|
-
on: function on(fun, state, name) {
|
73037
|
-
if (!callback[state]) {
|
73038
|
-
callback[state] = {};
|
73168
|
+
return result;
|
73039
73169
|
}
|
73040
|
-
|
73041
|
-
callback[state][name] = fun;
|
73042
|
-
},
|
73043
|
-
off: function off(name) {
|
73044
|
-
callback = Object.fromEntries(Object.entries(callback).map(function (_ref3) {
|
73045
|
-
var k = _ref3[0],
|
73046
|
-
v = _ref3[1];
|
73047
|
-
var filterV = Object.fromEntries(Object.entries(v).filter(function (_ref4) {
|
73048
|
-
var k = _ref4[0];
|
73049
|
-
return k !== name;
|
73050
|
-
}));
|
73051
|
-
return [k, filterV];
|
73052
|
-
}));
|
73053
|
-
}
|
73170
|
+
};
|
73054
73171
|
}; // 调用绑定的监听函数
|
73055
73172
|
|
73056
|
-
|
73057
|
-
|
73058
|
-
|
73173
|
+
|
73174
|
+
function actionRefUseStateOn(callback, state) {
|
73175
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
73176
|
+
args[_key - 2] = arguments[_key];
|
73059
73177
|
}
|
73060
73178
|
|
73061
73179
|
if (callback[state]) {
|
73062
|
-
Object.entries(callback[state]).forEach(function (
|
73063
|
-
var k =
|
73064
|
-
v =
|
73180
|
+
Object.entries(callback[state]).forEach(function (_ref3) {
|
73181
|
+
var k = _ref3[0],
|
73182
|
+
v = _ref3[1];
|
73065
73183
|
|
73066
73184
|
if (v) {
|
73067
73185
|
v == null ? void 0 : v.apply(void 0, args);
|
73068
73186
|
}
|
73069
73187
|
});
|
73070
73188
|
}
|
73071
|
-
}; // 初始化 actionRef
|
73072
|
-
|
73073
|
-
|
73074
|
-
function initActionRef() {
|
73075
|
-
state = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default()(_initState);
|
73076
|
-
callback = lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default()(initCallback);
|
73077
73189
|
}
|
73078
73190
|
/** table 组件内监听 不对外暴露 */
|
73079
73191
|
|
@@ -73100,12 +73212,14 @@ function emit(key) {
|
|
73100
73212
|
fun.apply(void 0, args);
|
73101
73213
|
}
|
73102
73214
|
}
|
73103
|
-
function
|
73104
|
-
|
73105
|
-
var userAction = _objectSpread(_objectSpread({}, action), mutations);
|
73215
|
+
function initActionRef(ref, action) {
|
73216
|
+
var userAction = _objectSpread(_objectSpread({}, action), getMutations(ref));
|
73106
73217
|
|
73107
73218
|
ref.current = userAction;
|
73108
73219
|
}
|
73220
|
+
function useActionType(ref, action) {
|
73221
|
+
ref.current = _objectSpread(_objectSpread({}, ref.current), action);
|
73222
|
+
}
|
73109
73223
|
function cloneDeep(obj) {
|
73110
73224
|
return lodash_clonedeep__WEBPACK_IMPORTED_MODULE_0___default()(obj);
|
73111
73225
|
}
|
@@ -74006,7 +74120,8 @@ function doCommonRequest(config, context, history, extraParams) {
|
|
74006
74120
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
|
74007
74121
|
/* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33049);
|
74008
74122
|
/* harmony import */ var _alicloudfe_components__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_2__);
|
74009
|
-
/* harmony import */ var ahooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
74123
|
+
/* harmony import */ var ahooks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(56766);
|
74124
|
+
/* harmony import */ var ahooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26245);
|
74010
74125
|
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(39339);
|
74011
74126
|
/* harmony import */ var lodash_debounce__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(lodash_debounce__WEBPACK_IMPORTED_MODULE_3__);
|
74012
74127
|
var _excluded = ["children", "className", "ellipsisPosition", "endCharCount", "tooltipProps", "rows", "tooltip", "style"];
|
@@ -74044,11 +74159,11 @@ var Ellipsis = function Ellipsis(props) {
|
|
74044
74159
|
var textRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
74045
74160
|
var contentRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();
|
74046
74161
|
|
74047
|
-
var
|
74048
|
-
tooltipVisible =
|
74049
|
-
setTooltipVisible =
|
74162
|
+
var _useSafeState = (0,ahooks__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(false),
|
74163
|
+
tooltipVisible = _useSafeState[0],
|
74164
|
+
setTooltipVisible = _useSafeState[1];
|
74050
74165
|
|
74051
|
-
var contentSize = (0,
|
74166
|
+
var contentSize = (0,ahooks__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .Z)(contentRef);
|
74052
74167
|
(0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(lodash_debounce__WEBPACK_IMPORTED_MODULE_3___default()(function () {
|
74053
74168
|
var _textRef$current$offs, _textRef$current, _textRef$current$scro, _textRef$current2, _textRef$current$offs2, _textRef$current3, _textRef$current$scro2, _textRef$current4;
|
74054
74169
|
|
@@ -74298,9 +74413,8 @@ var LabelIconTip = function LabelIconTip(_ref) {
|
|
74298
74413
|
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(52308);
|
74299
74414
|
/* harmony import */ var lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(lodash_clonedeep__WEBPACK_IMPORTED_MODULE_2__);
|
74300
74415
|
/* harmony import */ var ___WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80653);
|
74301
|
-
var _excluded = ["tag", "renderMore", "maxShowNumber", "moreTagProps", "moreTagWidth"],
|
74302
|
-
_excluded2 = ["className"]
|
74303
|
-
_excluded3 = ["className"];
|
74416
|
+
var _excluded = ["tag", "renderMore", "maxShowNumber", "moreTagProps", "moreTagWidth", "otherOccupiedSpace", "target"],
|
74417
|
+
_excluded2 = ["className"];
|
74304
74418
|
|
74305
74419
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
74306
74420
|
|
@@ -74322,6 +74436,7 @@ var cls = (0,___WEBPACK_IMPORTED_MODULE_3__.baseClass)('teamix-pro-tag-group');
|
|
74322
74436
|
|
74323
74437
|
var ProTagGroup = function ProTagGroup(props) {
|
74324
74438
|
var ref = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
74439
|
+
var hiddenRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
74325
74440
|
var size = (0,ahooks__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .Z)(ref);
|
74326
74441
|
|
74327
74442
|
var _props$tag = props.tag,
|
@@ -74333,6 +74448,9 @@ var ProTagGroup = function ProTagGroup(props) {
|
|
74333
74448
|
moreTagProps = _props$moreTagProps === void 0 ? {} : _props$moreTagProps,
|
74334
74449
|
_props$moreTagWidth = props.moreTagWidth,
|
74335
74450
|
moreTagWidth = _props$moreTagWidth === void 0 ? 30 : _props$moreTagWidth,
|
74451
|
+
_props$otherOccupiedS = props.otherOccupiedSpace,
|
74452
|
+
otherOccupiedSpace = _props$otherOccupiedS === void 0 ? 0 : _props$otherOccupiedS,
|
74453
|
+
target = props.target,
|
74336
74454
|
others = _objectWithoutPropertiesLoose(props, _excluded);
|
74337
74455
|
|
74338
74456
|
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(tagProp),
|
@@ -74365,15 +74483,15 @@ var ProTagGroup = function ProTagGroup(props) {
|
|
74365
74483
|
|
74366
74484
|
|
74367
74485
|
if (maxShowNumber === 'auto') {
|
74368
|
-
var
|
74486
|
+
var _hiddenRef$current$of, _hiddenRef$current, _ref, _target$current$offse, _target$current, _ref$current;
|
74369
74487
|
|
74370
|
-
var scrollWidth = (
|
74371
|
-
var offsetWidth = (_ref$current$
|
74488
|
+
var scrollWidth = (_hiddenRef$current$of = hiddenRef == null ? void 0 : (_hiddenRef$current = hiddenRef.current) == null ? void 0 : _hiddenRef$current.offsetWidth) != null ? _hiddenRef$current$of : 0;
|
74489
|
+
var offsetWidth = ((_ref = (_target$current$offse = target == null ? void 0 : (_target$current = target.current) == null ? void 0 : _target$current.offsetWidth) != null ? _target$current$offse : ref == null ? void 0 : (_ref$current = ref.current) == null ? void 0 : _ref$current.offsetWidth) != null ? _ref : 0) - otherOccupiedSpace;
|
74372
74490
|
|
74373
74491
|
if (offsetWidth < scrollWidth) {
|
74374
|
-
var
|
74492
|
+
var _ref2, _target$current$query, _target$current2, _ref$current2, _tagsDom$children;
|
74375
74493
|
|
74376
|
-
var tagsDom = (
|
74494
|
+
var tagsDom = (_ref2 = (_target$current$query = target == null ? void 0 : (_target$current2 = target.current) == null ? void 0 : _target$current2.querySelector('.teamix-pro-tags')) != null ? _target$current$query : (_ref$current2 = ref.current) == null ? void 0 : _ref$current2.querySelector('.teamix-pro-tags')) != null ? _ref2 : null;
|
74377
74495
|
var tagList = (_tagsDom$children = tagsDom == null ? void 0 : tagsDom.children) != null ? _tagsDom$children : [];
|
74378
74496
|
var width = 0;
|
74379
74497
|
var flag = 0;
|
@@ -74393,36 +74511,33 @@ var ProTagGroup = function ProTagGroup(props) {
|
|
74393
74511
|
} else {
|
74394
74512
|
count = tag.length;
|
74395
74513
|
}
|
74396
|
-
} // 指定tag显示数量
|
74514
|
+
} // // 指定tag显示数量
|
74515
|
+
// if (count === 0 && tag.length > 0) {
|
74516
|
+
// const { className, ...others } = moreTagProps;
|
74517
|
+
// const countTag = {
|
74518
|
+
// children: `+${tag.length}`,
|
74519
|
+
// className: `${cls('remain')} teamix-pro-tag`,
|
74520
|
+
// ...others,
|
74521
|
+
// };
|
74522
|
+
// return [countTag];
|
74523
|
+
// }
|
74524
|
+
// tag 显示不下。进行折叠
|
74397
74525
|
|
74398
74526
|
|
74399
|
-
if (
|
74527
|
+
if (tag.length > count) {
|
74400
74528
|
var className = moreTagProps.className,
|
74401
74529
|
_others = _objectWithoutPropertiesLoose(moreTagProps, _excluded2);
|
74402
74530
|
|
74403
74531
|
var countTag = _objectSpread({
|
74404
|
-
children: "+" + tag.length,
|
74405
|
-
className: cls('remain') + " teamix-pro-tag"
|
74406
|
-
}, _others);
|
74407
|
-
|
74408
|
-
return [countTag];
|
74409
|
-
} // tag 显示不下。进行折叠
|
74410
|
-
|
74411
|
-
|
74412
|
-
if (tag.length > count) {
|
74413
|
-
var _className = moreTagProps.className,
|
74414
|
-
_others2 = _objectWithoutPropertiesLoose(moreTagProps, _excluded3);
|
74415
|
-
|
74416
|
-
var _countTag = _objectSpread({
|
74417
74532
|
children: "+" + (tag.length - count),
|
74418
74533
|
className: cls('remain') + " teamix-pro-tag"
|
74419
|
-
},
|
74534
|
+
}, _others);
|
74420
74535
|
|
74421
|
-
var customRenderMore = renderMore == null ? void 0 : renderMore(count, tag, ref);
|
74536
|
+
var customRenderMore = renderMore == null ? void 0 : renderMore(count, tag, target != null ? target : ref);
|
74422
74537
|
var remainTags = tag.filter(function (_item, index) {
|
74423
74538
|
return index < count;
|
74424
74539
|
});
|
74425
|
-
return [].concat(remainTags, [customRenderMore != null ? customRenderMore :
|
74540
|
+
return [].concat(remainTags, [customRenderMore != null ? customRenderMore : countTag]);
|
74426
74541
|
}
|
74427
74542
|
|
74428
74543
|
return tag;
|
@@ -74435,7 +74550,8 @@ var ProTagGroup = function ProTagGroup(props) {
|
|
74435
74550
|
}),
|
74436
74551
|
ref: ref
|
74437
74552
|
}, others), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
74438
|
-
className: cls('hidden')
|
74553
|
+
className: cls('hidden'),
|
74554
|
+
ref: hiddenRef
|
74439
74555
|
}, (0,___WEBPACK_IMPORTED_MODULE_1__/* .renderTags */ .a)(tag)), realTag.length > 0 && (0,___WEBPACK_IMPORTED_MODULE_1__/* .renderTags */ .a)(realTag));
|
74440
74556
|
};
|
74441
74557
|
|