@lemon-fe/components 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/data-grid/index.js +7 -2
- package/es/data-grid/index.less +2 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -2
- package/package.json +3 -2
package/es/data-grid/index.js
CHANGED
|
@@ -1286,6 +1286,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1286
1286
|
key: "getDataFromServer",
|
|
1287
1287
|
value: function getDataFromServer() {
|
|
1288
1288
|
var _this7 = this;
|
|
1289
|
+
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1289
1290
|
this.afterReady(function () {
|
|
1290
1291
|
var _this7$props = _this7.props,
|
|
1291
1292
|
fetch = _this7$props.fetch,
|
|
@@ -1336,7 +1337,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1336
1337
|
var summary = _this7.props.summary;
|
|
1337
1338
|
_this7.updateRowData(res.data);
|
|
1338
1339
|
_this7.api.setPinnedBottomRowData(_this7.getSummaryRowData(summary, res.summary));
|
|
1339
|
-
if (res.data.length > 0) {
|
|
1340
|
+
if (res.data.length > 0 && !params.refresh) {
|
|
1340
1341
|
_this7.api.ensureIndexVisible(0);
|
|
1341
1342
|
}
|
|
1342
1343
|
if (onLoad) {
|
|
@@ -1526,7 +1527,9 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1526
1527
|
}, {
|
|
1527
1528
|
key: "refresh",
|
|
1528
1529
|
value: function refresh() {
|
|
1529
|
-
this.getDataFromServer(
|
|
1530
|
+
this.getDataFromServer({
|
|
1531
|
+
refresh: true
|
|
1532
|
+
});
|
|
1530
1533
|
}
|
|
1531
1534
|
}, {
|
|
1532
1535
|
key: "ready",
|
|
@@ -1605,6 +1608,8 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1605
1608
|
onClear: this.handleClearSelected,
|
|
1606
1609
|
key: "selection"
|
|
1607
1610
|
}));
|
|
1611
|
+
} else {
|
|
1612
|
+
gridRowSelection = 'single';
|
|
1608
1613
|
}
|
|
1609
1614
|
if (showSearch) {
|
|
1610
1615
|
footer.push( /*#__PURE__*/React.createElement(Search, _extends({
|
package/es/data-grid/index.less
CHANGED
|
@@ -516,6 +516,7 @@
|
|
|
516
516
|
--ag-font-size: 14px;
|
|
517
517
|
--ag-icon-size: 16px;
|
|
518
518
|
--ag-background-color: #fff;
|
|
519
|
+
--ag-odd-row-background-color: #fafbfb;
|
|
519
520
|
--ag-foreground-color: #333;
|
|
520
521
|
--ag-border-color: #eaeaea;
|
|
521
522
|
--ag-row-hover-color: #eee;
|
|
@@ -533,7 +534,7 @@
|
|
|
533
534
|
--ag-selected-row-background-color: ~'var(--@{ant-prefix}-primary-1)';
|
|
534
535
|
--ag-selected-tab-underline-width: 2px;
|
|
535
536
|
--ag-range-selection-border-color: ~'var(--@{ant-prefix}-primary-5)';
|
|
536
|
-
--ag-range-selection-highlight-color: ~'var(--@{ant-prefix}-primary-
|
|
537
|
+
--ag-range-selection-highlight-color: ~'var(--@{ant-prefix}-primary-2)';
|
|
537
538
|
--ag-checkbox-unchecked-color: #ccc;
|
|
538
539
|
--ag-checkbox-background-color: var(--ag-background-color);
|
|
539
540
|
--ag-checkbox-checked-color: ~'var(--@{ant-prefix}-primary-color)';
|
package/es/index.d.ts
CHANGED
|
@@ -54,6 +54,6 @@ export { default as DatePicker } from './date-picker';
|
|
|
54
54
|
export { default as TimePicker } from './time-picker';
|
|
55
55
|
export { TreeSelect, Tree, Cascader, Menu } from './others';
|
|
56
56
|
export type { PickerPanelDateProps } from 'antd/lib/calendar/generateCalendar';
|
|
57
|
-
export { DefaultOptionType } from 'antd/lib/cascader';
|
|
57
|
+
export type { DefaultOptionType } from 'antd/lib/cascader';
|
|
58
58
|
export type { CheckboxGroupProps } from 'antd/lib/checkbox';
|
|
59
59
|
export type { TextAreaProps } from 'antd/lib/input';
|
package/es/index.js
CHANGED
|
@@ -44,5 +44,4 @@ export { default as message } from "./message";
|
|
|
44
44
|
export { default as Select } from "./select";
|
|
45
45
|
export { default as DatePicker } from "./date-picker";
|
|
46
46
|
export { default as TimePicker } from "./time-picker";
|
|
47
|
-
export { TreeSelect, Tree, Cascader, Menu } from "./others";
|
|
48
|
-
export { DefaultOptionType } from 'antd/lib/cascader';
|
|
47
|
+
export { TreeSelect, Tree, Cascader, Menu } from "./others";
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lemon-fe/components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "> TODO: description",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"author": "鲁盛杰 <lusj@cnlemon.net>",
|
|
8
8
|
"sideEffects": [
|
|
9
9
|
"es/index.less",
|
|
10
|
+
"es/others.js",
|
|
10
11
|
"src/index.less"
|
|
11
12
|
],
|
|
12
13
|
"main": "es/index.js",
|
|
@@ -66,5 +67,5 @@
|
|
|
66
67
|
"publishConfig": {
|
|
67
68
|
"registry": "https://registry.npmjs.org"
|
|
68
69
|
},
|
|
69
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "8c059ebf163ebc08134ec596a5d1233cef74e620"
|
|
70
71
|
}
|