@lemon-fe/components 1.2.1 → 1.2.3
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 +8 -3
- package/es/data-grid/index.less +4 -2
- 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({
|
|
@@ -1663,7 +1668,7 @@ var InternalDataGrid = /*#__PURE__*/function (_Component) {
|
|
|
1663
1668
|
enableCellEditingOnBackspace: true,
|
|
1664
1669
|
maintainColumnOrder: true,
|
|
1665
1670
|
suppressCsvExport: true,
|
|
1666
|
-
|
|
1671
|
+
rowMultiSelectWithClick: gridRowSelection === 'multiple',
|
|
1667
1672
|
noRowsOverlayComponent: this.NoRowsOverlay,
|
|
1668
1673
|
getMainMenuItems: this.getMainMenuItems,
|
|
1669
1674
|
rowBuffer: 20,
|
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;
|
|
@@ -530,10 +531,11 @@
|
|
|
530
531
|
--ag-header-column-resize-handle-color: #d9d9d9;
|
|
531
532
|
--ag-cell-horizontal-padding: 8px;
|
|
532
533
|
--ag-icon-font-family: 'agGridAlpine';
|
|
533
|
-
--ag-selected-row-background-color: ~'var(--@{ant-prefix}-primary-1)';
|
|
534
|
+
// --ag-selected-row-background-color: ~'var(--@{ant-prefix}-primary-1)';
|
|
535
|
+
--ag-selected-row-background-color: #dde8fd;
|
|
534
536
|
--ag-selected-tab-underline-width: 2px;
|
|
535
537
|
--ag-range-selection-border-color: ~'var(--@{ant-prefix}-primary-5)';
|
|
536
|
-
--ag-range-selection-highlight-color: ~'var(--@{ant-prefix}-primary-
|
|
538
|
+
--ag-range-selection-highlight-color: ~'var(--@{ant-prefix}-primary-2)';
|
|
537
539
|
--ag-checkbox-unchecked-color: #ccc;
|
|
538
540
|
--ag-checkbox-background-color: var(--ag-background-color);
|
|
539
541
|
--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.3",
|
|
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": "831556422221ead3da6a017b786192be272de57e"
|
|
70
71
|
}
|