wargerm 0.6.10 → 0.6.11
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/NtTable/index.d.ts +3 -2
- package/dist/index.css +6 -0
- package/dist/index.esm.css +6 -0
- package/dist/index.esm.js +19 -10
- package/dist/index.js +19 -10
- package/package.json +1 -1
@@ -72,7 +72,7 @@ declare type Props = {
|
|
72
72
|
pageSize?: number;
|
73
73
|
current?: number;
|
74
74
|
}, sort?: any, filter?: any) => Promise<any>;
|
75
|
-
onLoad?: (dataSource: Record<string, any>[]) => void;
|
75
|
+
onLoad?: (dataSource: Record<string, any>[], res: Record<string, any>) => void;
|
76
76
|
onSubmit?: (params: Record<string, any>) => void;
|
77
77
|
onReset?: () => void;
|
78
78
|
rowKey: ((record: Record<string, any>) => number | string) | string;
|
@@ -94,4 +94,5 @@ declare namespace NtTable {
|
|
94
94
|
rowKey: string;
|
95
95
|
};
|
96
96
|
}
|
97
|
-
|
97
|
+
declare const _default: React.MemoExoticComponent<typeof NtTable>;
|
98
|
+
export default _default;
|
package/dist/index.css
CHANGED
@@ -28096,6 +28096,12 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
28096
28096
|
background: #4d82ff;
|
28097
28097
|
color: #ffffff;
|
28098
28098
|
}
|
28099
|
+
[data-prefers-color='light'] .ant-table-tbody > tr.ant-table-row:hover > td a,
|
28100
|
+
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover a,
|
28101
|
+
[data-prefers-color='light'] .ant-table-tbody > tr.ant-table-row:hover > td .ant-typography,
|
28102
|
+
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover .ant-typography {
|
28103
|
+
color: #ffffff;
|
28104
|
+
}
|
28099
28105
|
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover:first-child {
|
28100
28106
|
border-radius: 4px 0px 0px 4px;
|
28101
28107
|
}
|
package/dist/index.esm.css
CHANGED
@@ -28096,6 +28096,12 @@ button[data-prefers-color='light'] .swiper-pagination-bullet {
|
|
28096
28096
|
background: #4d82ff;
|
28097
28097
|
color: #ffffff;
|
28098
28098
|
}
|
28099
|
+
[data-prefers-color='light'] .ant-table-tbody > tr.ant-table-row:hover > td a,
|
28100
|
+
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover a,
|
28101
|
+
[data-prefers-color='light'] .ant-table-tbody > tr.ant-table-row:hover > td .ant-typography,
|
28102
|
+
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover .ant-typography {
|
28103
|
+
color: #ffffff;
|
28104
|
+
}
|
28099
28105
|
[data-prefers-color='light'] .ant-table-tbody > tr > td.ant-table-cell-row-hover:first-child {
|
28100
28106
|
border-radius: 4px 0px 0px 4px;
|
28101
28107
|
}
|
package/dist/index.esm.js
CHANGED
@@ -2684,7 +2684,8 @@ function Table(_ref) {
|
|
2684
2684
|
tableList = _ref.dataSource,
|
2685
2685
|
request = _ref.request,
|
2686
2686
|
onLoad = _ref.onLoad,
|
2687
|
-
params = _ref.params,
|
2687
|
+
_ref$params = _ref.params,
|
2688
|
+
params = _ref$params === void 0 ? {} : _ref$params,
|
2688
2689
|
onSubmit = _ref.onSubmit,
|
2689
2690
|
_ref$rowKey = _ref.rowKey,
|
2690
2691
|
rowKey = _ref$rowKey === void 0 ? 'key' : _ref$rowKey,
|
@@ -7121,6 +7122,7 @@ function FrameBox$1(_ref) {
|
|
7121
7122
|
}
|
7122
7123
|
|
7123
7124
|
var _excluded$n = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
|
7125
|
+
|
7124
7126
|
function NtTable(_ref) {
|
7125
7127
|
var _formSearchRef$curren4, _classnames2, _columns$, _columns$2;
|
7126
7128
|
|
@@ -7128,7 +7130,8 @@ function NtTable(_ref) {
|
|
7128
7130
|
tableList = _ref.dataSource,
|
7129
7131
|
request = _ref.request,
|
7130
7132
|
onLoad = _ref.onLoad,
|
7131
|
-
params = _ref.params,
|
7133
|
+
_ref$params = _ref.params,
|
7134
|
+
params = _ref$params === void 0 ? {} : _ref$params,
|
7132
7135
|
onSubmit = _ref.onSubmit,
|
7133
7136
|
_ref$rowKey = _ref.rowKey,
|
7134
7137
|
rowKey = _ref$rowKey === void 0 ? 'key' : _ref$rowKey,
|
@@ -7535,12 +7538,14 @@ function NtTable(_ref) {
|
|
7535
7538
|
case 7:
|
7536
7539
|
res = _context.sent;
|
7537
7540
|
setLoading(false);
|
7538
|
-
onLoad && onLoad(res.data);
|
7539
|
-
setDataSource(res.data);
|
7540
|
-
setTotal(res.total || 0);
|
7541
|
+
onLoad && onLoad(res === null || res === void 0 ? void 0 : res.data, res);
|
7542
|
+
setDataSource((res === null || res === void 0 ? void 0 : res.data) || []);
|
7543
|
+
setTotal((res === null || res === void 0 ? void 0 : res.total) || 0);
|
7541
7544
|
setpaginationParams(function (c) {
|
7545
|
+
var _res$data;
|
7546
|
+
|
7542
7547
|
return _objectSpread2(_objectSpread2(_objectSpread2({}, c), {}, {
|
7543
|
-
total: res.total || res.data.length
|
7548
|
+
total: (res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) || 0
|
7544
7549
|
}, pagination), requestParams);
|
7545
7550
|
});
|
7546
7551
|
_context.next = 16;
|
@@ -7548,13 +7553,15 @@ function NtTable(_ref) {
|
|
7548
7553
|
|
7549
7554
|
case 15:
|
7550
7555
|
setpaginationParams(function (c) {
|
7556
|
+
var _tableList$slice;
|
7557
|
+
|
7551
7558
|
var obj = _objectSpread2(_objectSpread2(_objectSpread2({}, c), {}, {
|
7552
|
-
total: tableList
|
7559
|
+
total: (tableList === null || tableList === void 0 ? void 0 : tableList.length) || 0
|
7553
7560
|
}, pagination), pageParams);
|
7554
7561
|
|
7555
7562
|
var current = obj.current,
|
7556
7563
|
pageSize = obj.pageSize;
|
7557
|
-
setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize)
|
7564
|
+
setDataSource((tableList === null || tableList === void 0 ? void 0 : (_tableList$slice = tableList.slice) === null || _tableList$slice === void 0 ? void 0 : _tableList$slice.call(tableList, (current - 1) * pageSize, current * pageSize)) || []);
|
7558
7565
|
return obj;
|
7559
7566
|
});
|
7560
7567
|
|
@@ -7565,7 +7572,7 @@ function NtTable(_ref) {
|
|
7565
7572
|
}
|
7566
7573
|
}, _callee);
|
7567
7574
|
}))();
|
7568
|
-
}, [params, pageParams, pagination, tableList, formSearch, columns]);
|
7575
|
+
}, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
|
7569
7576
|
|
7570
7577
|
var onFormSubmit = function onFormSubmit(values) {
|
7571
7578
|
onSubmit && onSubmit(values);
|
@@ -7682,9 +7689,11 @@ function NtTable(_ref) {
|
|
7682
7689
|
}
|
7683
7690
|
}, paginationParams)));
|
7684
7691
|
}
|
7692
|
+
|
7685
7693
|
NtTable.defaultProps = {
|
7686
7694
|
rowKey: 'key'
|
7687
7695
|
};
|
7696
|
+
var index$7 = /*#__PURE__*/memo(NtTable);
|
7688
7697
|
|
7689
7698
|
/*
|
7690
7699
|
* @Author: lijin
|
@@ -8481,4 +8490,4 @@ if (REACT_APP_ENV == 'development') {
|
|
8481
8490
|
document.documentElement.setAttribute(COLOR_ATTR_NAME, 'nt');
|
8482
8491
|
}
|
8483
8492
|
|
8484
|
-
export { Index$a as AutoScroll, Index$c as Breadcrumb, WButton as Button, index$4 as Calendar, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$9 as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, NtTable, Index$8 as Number, NumericInput, Index$3 as Radio, Select, Index$b as Swiper, WSwitch as Switch, index$3 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$6 as Video, index$5 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, create as whox, wmox };
|
8493
|
+
export { Index$a as AutoScroll, Index$c as Breadcrumb, WButton as Button, index$4 as Calendar, index$2 as Card, WCascader as Cascader, Index$4 as Checkbox, Index$9 as CountUp, Index$2 as DatePicker, DragBox, index as IconFont, Index as Input, WInputNumber as InputNumber, LineEcharts, Modal, ModalForm$1 as ModalForm, Modal$1 as ModalTips, index$7 as NtTable, Index$8 as Number, NumericInput, Index$3 as Radio, Select, Index$b as Swiper, WSwitch as Switch, index$3 as TabelCard, index$1 as Table, Index$7 as TreeSelect, Upload, index$6 as Video, index$5 as VideoPlayer, Index$6 as WDatePicker, WForm$1 as WForm, WaterLevelCharts, WebsocketHeart, useEventEmitter, create as whox, wmox };
|
package/dist/index.js
CHANGED
@@ -2749,7 +2749,8 @@ function Table(_ref) {
|
|
2749
2749
|
tableList = _ref.dataSource,
|
2750
2750
|
request = _ref.request,
|
2751
2751
|
onLoad = _ref.onLoad,
|
2752
|
-
params = _ref.params,
|
2752
|
+
_ref$params = _ref.params,
|
2753
|
+
params = _ref$params === void 0 ? {} : _ref$params,
|
2753
2754
|
onSubmit = _ref.onSubmit,
|
2754
2755
|
_ref$rowKey = _ref.rowKey,
|
2755
2756
|
rowKey = _ref$rowKey === void 0 ? 'key' : _ref$rowKey,
|
@@ -7186,6 +7187,7 @@ function FrameBox$1(_ref) {
|
|
7186
7187
|
}
|
7187
7188
|
|
7188
7189
|
var _excluded$n = ["columns", "dataSource", "request", "onLoad", "params", "onSubmit", "rowKey", "onRow", "className", "rowClassName", "rowSelection", "style", "tbodyStyle", "thStyle", "border", "scroll", "pagination", "search", "frameBoxTable", "frameBoxDirection", "formRef", "none"];
|
7190
|
+
|
7189
7191
|
function NtTable(_ref) {
|
7190
7192
|
var _formSearchRef$curren4, _classnames2, _columns$, _columns$2;
|
7191
7193
|
|
@@ -7193,7 +7195,8 @@ function NtTable(_ref) {
|
|
7193
7195
|
tableList = _ref.dataSource,
|
7194
7196
|
request = _ref.request,
|
7195
7197
|
onLoad = _ref.onLoad,
|
7196
|
-
params = _ref.params,
|
7198
|
+
_ref$params = _ref.params,
|
7199
|
+
params = _ref$params === void 0 ? {} : _ref$params,
|
7197
7200
|
onSubmit = _ref.onSubmit,
|
7198
7201
|
_ref$rowKey = _ref.rowKey,
|
7199
7202
|
rowKey = _ref$rowKey === void 0 ? 'key' : _ref$rowKey,
|
@@ -7600,12 +7603,14 @@ function NtTable(_ref) {
|
|
7600
7603
|
case 7:
|
7601
7604
|
res = _context.sent;
|
7602
7605
|
setLoading(false);
|
7603
|
-
onLoad && onLoad(res.data);
|
7604
|
-
setDataSource(res.data);
|
7605
|
-
setTotal(res.total || 0);
|
7606
|
+
onLoad && onLoad(res === null || res === void 0 ? void 0 : res.data, res);
|
7607
|
+
setDataSource((res === null || res === void 0 ? void 0 : res.data) || []);
|
7608
|
+
setTotal((res === null || res === void 0 ? void 0 : res.total) || 0);
|
7606
7609
|
setpaginationParams(function (c) {
|
7610
|
+
var _res$data;
|
7611
|
+
|
7607
7612
|
return _objectSpread2(_objectSpread2(_objectSpread2({}, c), {}, {
|
7608
|
-
total: res.total || res.data.length
|
7613
|
+
total: (res === null || res === void 0 ? void 0 : res.total) || (res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : _res$data.length) || 0
|
7609
7614
|
}, pagination), requestParams);
|
7610
7615
|
});
|
7611
7616
|
_context.next = 16;
|
@@ -7613,13 +7618,15 @@ function NtTable(_ref) {
|
|
7613
7618
|
|
7614
7619
|
case 15:
|
7615
7620
|
setpaginationParams(function (c) {
|
7621
|
+
var _tableList$slice;
|
7622
|
+
|
7616
7623
|
var obj = _objectSpread2(_objectSpread2(_objectSpread2({}, c), {}, {
|
7617
|
-
total: tableList
|
7624
|
+
total: (tableList === null || tableList === void 0 ? void 0 : tableList.length) || 0
|
7618
7625
|
}, pagination), pageParams);
|
7619
7626
|
|
7620
7627
|
var current = obj.current,
|
7621
7628
|
pageSize = obj.pageSize;
|
7622
|
-
setDataSource(tableList ? tableList.slice((current - 1) * pageSize, current * pageSize)
|
7629
|
+
setDataSource((tableList === null || tableList === void 0 ? void 0 : (_tableList$slice = tableList.slice) === null || _tableList$slice === void 0 ? void 0 : _tableList$slice.call(tableList, (current - 1) * pageSize, current * pageSize)) || []);
|
7623
7630
|
return obj;
|
7624
7631
|
});
|
7625
7632
|
|
@@ -7630,7 +7637,7 @@ function NtTable(_ref) {
|
|
7630
7637
|
}
|
7631
7638
|
}, _callee);
|
7632
7639
|
}))();
|
7633
|
-
}, [params, pageParams, pagination, tableList, formSearch, columns]);
|
7640
|
+
}, [JSON.stringify(params), JSON.stringify(pageParams), JSON.stringify(pagination), JSON.stringify(tableList), formSearch, JSON.stringify(columns)]);
|
7634
7641
|
|
7635
7642
|
var onFormSubmit = function onFormSubmit(values) {
|
7636
7643
|
onSubmit && onSubmit(values);
|
@@ -7747,9 +7754,11 @@ function NtTable(_ref) {
|
|
7747
7754
|
}
|
7748
7755
|
}, paginationParams)));
|
7749
7756
|
}
|
7757
|
+
|
7750
7758
|
NtTable.defaultProps = {
|
7751
7759
|
rowKey: 'key'
|
7752
7760
|
};
|
7761
|
+
var index$7 = /*#__PURE__*/React.memo(NtTable);
|
7753
7762
|
|
7754
7763
|
/*
|
7755
7764
|
* @Author: lijin
|
@@ -8563,7 +8572,7 @@ exports.LineEcharts = LineEcharts;
|
|
8563
8572
|
exports.Modal = Modal;
|
8564
8573
|
exports.ModalForm = ModalForm$1;
|
8565
8574
|
exports.ModalTips = Modal$1;
|
8566
|
-
exports.NtTable =
|
8575
|
+
exports.NtTable = index$7;
|
8567
8576
|
exports.Number = Index$8;
|
8568
8577
|
exports.NumericInput = NumericInput;
|
8569
8578
|
exports.Radio = Index$3;
|