wargerm 0.2.4 → 0.2.8
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/components/WForm/index.d.ts +1 -0
- package/dist/index.esm.js +12 -9
- package/dist/index.js +11 -8
- package/package.json +1 -1
@@ -48,6 +48,7 @@ export interface WFormProps extends FormProps {
|
|
48
48
|
style?: React.CSSProperties;
|
49
49
|
columns: ColumnProps[];
|
50
50
|
disabled?: boolean;
|
51
|
+
disabledHideInSearch?: boolean;
|
51
52
|
onSubmit?: (params: Record<string, any>) => void;
|
52
53
|
onReset?: () => void;
|
53
54
|
formRef?: MutableRefObject<FormInstance>;
|
package/dist/index.esm.js
CHANGED
@@ -38,7 +38,7 @@ import _TreeSelect from 'antd/es/tree-select';
|
|
38
38
|
import uniqBy from 'lodash/uniqBy';
|
39
39
|
import CountUp from 'react-countup';
|
40
40
|
import { Swiper, SwiperSlide } from 'swiper/react';
|
41
|
-
import SwiperCore, { Pagination, Navigation } from 'swiper';
|
41
|
+
import SwiperCore, { Pagination, Navigation, Autoplay } from 'swiper';
|
42
42
|
import 'antd/es/breadcrumb/style';
|
43
43
|
import _Breadcrumb from 'antd/es/breadcrumb';
|
44
44
|
import ReactDOM from 'react-dom';
|
@@ -7532,7 +7532,7 @@ Table.defaultProps = {
|
|
7532
7532
|
rowKey: 'key'
|
7533
7533
|
};
|
7534
7534
|
|
7535
|
-
var _excluded$5 = ["columns", "className", "style", "search", "disabled", "onSubmit", "onReset"];
|
7535
|
+
var _excluded$5 = ["columns", "className", "style", "search", "disabled", "disabledHideInSearch", "onSubmit", "onReset"];
|
7536
7536
|
var RangePicker$2 = Index$2.RangePicker;
|
7537
7537
|
|
7538
7538
|
var WForm = function WForm(props, ref) {
|
@@ -7541,6 +7541,7 @@ var WForm = function WForm(props, ref) {
|
|
7541
7541
|
style = props.style,
|
7542
7542
|
search = props.search,
|
7543
7543
|
disabled = props.disabled,
|
7544
|
+
disabledHideInSearch = props.disabledHideInSearch,
|
7544
7545
|
onSubmit = props.onSubmit,
|
7545
7546
|
onReset = props.onReset,
|
7546
7547
|
extraProps = _objectWithoutProperties(props, _excluded$5);
|
@@ -7560,7 +7561,7 @@ var WForm = function WForm(props, ref) {
|
|
7560
7561
|
setColumnsFields = _useState4[1];
|
7561
7562
|
|
7562
7563
|
var filterFormColumns = columns.filter(function (c) {
|
7563
|
-
return !c.hideInSearch;
|
7564
|
+
return !c.hideInSearch || disabledHideInSearch;
|
7564
7565
|
}).sort(function (a, b) {
|
7565
7566
|
return (b.order || 0) - (a.order || 0);
|
7566
7567
|
});
|
@@ -8482,7 +8483,7 @@ var Index$8 = function Index(_ref) {
|
|
8482
8483
|
|
8483
8484
|
var _excluded$9 = ["data", "onClick", "renderItem"];
|
8484
8485
|
|
8485
|
-
SwiperCore.use([Pagination, Navigation]);
|
8486
|
+
SwiperCore.use([Pagination, Navigation, Autoplay]);
|
8486
8487
|
|
8487
8488
|
var Index$9 = function Index(props) {
|
8488
8489
|
var data = props.data,
|
@@ -9545,6 +9546,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9545
9546
|
ref: formRef,
|
9546
9547
|
disabled: disabled,
|
9547
9548
|
onSubmit: onSubmit,
|
9549
|
+
disabledHideInSearch: true,
|
9548
9550
|
search: search,
|
9549
9551
|
columns: columns
|
9550
9552
|
}));
|
@@ -9552,7 +9554,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9552
9554
|
|
9553
9555
|
var ModalForm$1 = /*#__PURE__*/React.forwardRef(ModalForm);
|
9554
9556
|
|
9555
|
-
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig"];
|
9557
|
+
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig", "optionColumnConfig"];
|
9556
9558
|
|
9557
9559
|
var TabelCard = function TabelCard(props, ref) {
|
9558
9560
|
var columns = props.columns,
|
@@ -9563,6 +9565,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9563
9565
|
className = props.className,
|
9564
9566
|
style = props.style,
|
9565
9567
|
modalConfig = props.modalConfig,
|
9568
|
+
optionColumnConfig = props.optionColumnConfig,
|
9566
9569
|
extraProps = _objectWithoutProperties(props, _excluded$e);
|
9567
9570
|
|
9568
9571
|
var actionRef = useRef();
|
@@ -9616,7 +9619,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9616
9619
|
|
9617
9620
|
loading();
|
9618
9621
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
|
9619
|
-
});
|
9622
|
+
}, record);
|
9620
9623
|
|
9621
9624
|
case 3:
|
9622
9625
|
case "end":
|
@@ -9848,7 +9851,6 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9848
9851
|
search: modalFormSearch
|
9849
9852
|
}, modalConfig), {}, {
|
9850
9853
|
columns: (columns || []).filter(function (item) {
|
9851
|
-
delete item.hideInSearch;
|
9852
9854
|
return !item.hiddenInModalForm;
|
9853
9855
|
})
|
9854
9856
|
})), /*#__PURE__*/React.createElement(ProTable, _objectSpread2({
|
@@ -9858,14 +9860,15 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9858
9860
|
options: false,
|
9859
9861
|
toolBarRender: false,
|
9860
9862
|
request: request,
|
9861
|
-
columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray(columns || []), [{
|
9863
|
+
columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray(columns || []), [_objectSpread2({
|
9862
9864
|
title: '操作',
|
9863
9865
|
dataIndex: 'option',
|
9864
9866
|
valueType: 'option',
|
9867
|
+
align: 'center',
|
9865
9868
|
render: function render(_, record, index) {
|
9866
9869
|
return tableActionDom(record, index);
|
9867
9870
|
}
|
9868
|
-
}]) : columns || [],
|
9871
|
+
}, optionColumnConfig)]) : columns || [],
|
9869
9872
|
search: {
|
9870
9873
|
labelWidth: 'auto',
|
9871
9874
|
optionRender: function optionRender(searchConfig, formProps, dom) {
|
package/dist/index.js
CHANGED
@@ -7565,7 +7565,7 @@ Table.defaultProps = {
|
|
7565
7565
|
rowKey: 'key'
|
7566
7566
|
};
|
7567
7567
|
|
7568
|
-
var _excluded$5 = ["columns", "className", "style", "search", "disabled", "onSubmit", "onReset"];
|
7568
|
+
var _excluded$5 = ["columns", "className", "style", "search", "disabled", "disabledHideInSearch", "onSubmit", "onReset"];
|
7569
7569
|
var RangePicker$2 = Index$2.RangePicker;
|
7570
7570
|
|
7571
7571
|
var WForm = function WForm(props, ref) {
|
@@ -7574,6 +7574,7 @@ var WForm = function WForm(props, ref) {
|
|
7574
7574
|
style = props.style,
|
7575
7575
|
search = props.search,
|
7576
7576
|
disabled = props.disabled,
|
7577
|
+
disabledHideInSearch = props.disabledHideInSearch,
|
7577
7578
|
onSubmit = props.onSubmit,
|
7578
7579
|
onReset = props.onReset,
|
7579
7580
|
extraProps = _objectWithoutProperties(props, _excluded$5);
|
@@ -7593,7 +7594,7 @@ var WForm = function WForm(props, ref) {
|
|
7593
7594
|
setColumnsFields = _useState4[1];
|
7594
7595
|
|
7595
7596
|
var filterFormColumns = columns.filter(function (c) {
|
7596
|
-
return !c.hideInSearch;
|
7597
|
+
return !c.hideInSearch || disabledHideInSearch;
|
7597
7598
|
}).sort(function (a, b) {
|
7598
7599
|
return (b.order || 0) - (a.order || 0);
|
7599
7600
|
});
|
@@ -8515,7 +8516,7 @@ var Index$8 = function Index(_ref) {
|
|
8515
8516
|
|
8516
8517
|
var _excluded$9 = ["data", "onClick", "renderItem"];
|
8517
8518
|
|
8518
|
-
SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation]);
|
8519
|
+
SwiperCore__default['default'].use([SwiperCore.Pagination, SwiperCore.Navigation, SwiperCore.Autoplay]);
|
8519
8520
|
|
8520
8521
|
var Index$9 = function Index(props) {
|
8521
8522
|
var data = props.data,
|
@@ -9578,6 +9579,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9578
9579
|
ref: formRef,
|
9579
9580
|
disabled: disabled,
|
9580
9581
|
onSubmit: onSubmit,
|
9582
|
+
disabledHideInSearch: true,
|
9581
9583
|
search: search,
|
9582
9584
|
columns: columns
|
9583
9585
|
}));
|
@@ -9585,7 +9587,7 @@ var ModalForm = function ModalForm(props, ref) {
|
|
9585
9587
|
|
9586
9588
|
var ModalForm$1 = /*#__PURE__*/React__default['default'].forwardRef(ModalForm);
|
9587
9589
|
|
9588
|
-
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig"];
|
9590
|
+
var _excluded$e = ["columns", "request", "modalFormSearch", "tableAction", "renderTableBar", "className", "style", "modalConfig", "optionColumnConfig"];
|
9589
9591
|
|
9590
9592
|
var TabelCard = function TabelCard(props, ref) {
|
9591
9593
|
var columns = props.columns,
|
@@ -9596,6 +9598,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9596
9598
|
className = props.className,
|
9597
9599
|
style = props.style,
|
9598
9600
|
modalConfig = props.modalConfig,
|
9601
|
+
optionColumnConfig = props.optionColumnConfig,
|
9599
9602
|
extraProps = _objectWithoutProperties(props, _excluded$e);
|
9600
9603
|
|
9601
9604
|
var actionRef = React.useRef();
|
@@ -9649,7 +9652,7 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9649
9652
|
|
9650
9653
|
loading();
|
9651
9654
|
actionRef === null || actionRef === void 0 ? void 0 : (_actionRef$current = actionRef.current) === null || _actionRef$current === void 0 ? void 0 : _actionRef$current.reload();
|
9652
|
-
});
|
9655
|
+
}, record);
|
9653
9656
|
|
9654
9657
|
case 3:
|
9655
9658
|
case "end":
|
@@ -9881,7 +9884,6 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9881
9884
|
search: modalFormSearch
|
9882
9885
|
}, modalConfig), {}, {
|
9883
9886
|
columns: (columns || []).filter(function (item) {
|
9884
|
-
delete item.hideInSearch;
|
9885
9887
|
return !item.hiddenInModalForm;
|
9886
9888
|
})
|
9887
9889
|
})), /*#__PURE__*/React__default['default'].createElement(ProTable__default['default'], _objectSpread2({
|
@@ -9891,14 +9893,15 @@ var TabelCard = function TabelCard(props, ref) {
|
|
9891
9893
|
options: false,
|
9892
9894
|
toolBarRender: false,
|
9893
9895
|
request: request,
|
9894
|
-
columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray(columns || []), [{
|
9896
|
+
columns: tableAction && (tableAction === null || tableAction === void 0 ? void 0 : tableAction.length) > 0 ? [].concat(_toConsumableArray(columns || []), [_objectSpread2({
|
9895
9897
|
title: '操作',
|
9896
9898
|
dataIndex: 'option',
|
9897
9899
|
valueType: 'option',
|
9900
|
+
align: 'center',
|
9898
9901
|
render: function render(_, record, index) {
|
9899
9902
|
return tableActionDom(record, index);
|
9900
9903
|
}
|
9901
|
-
}]) : columns || [],
|
9904
|
+
}, optionColumnConfig)]) : columns || [],
|
9902
9905
|
search: {
|
9903
9906
|
labelWidth: 'auto',
|
9904
9907
|
optionRender: function optionRender(searchConfig, formProps, dom) {
|