@lemon-fe/kits 1.0.0-165 → 1.0.0-167

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.
@@ -1,6 +1,6 @@
1
1
  import { type InputNumberProps } from 'antd';
2
2
  import { type ReactNode } from 'react';
3
- export default function InputNumber(props: InputNumberProps & {
3
+ export default function InputNumber<T extends string | number = string | number>(props: InputNumberProps<T> & {
4
4
  /**
5
5
  * 后缀,不支持和prefix一起使用
6
6
  */
@@ -110,7 +110,7 @@
110
110
  min-width: 0;
111
111
  overflow: auto;
112
112
 
113
- .scrollBar(8px);
113
+ .scrollBar();
114
114
  }
115
115
 
116
116
  &-footer {
@@ -139,6 +139,7 @@
139
139
 
140
140
  &-main > & {
141
141
  flex: 1;
142
+ min-height: 0;
142
143
  background-color: transparent;
143
144
  }
144
145
 
@@ -1,7 +1,7 @@
1
1
  import type { CSSProperties, ReactElement } from 'react';
2
2
  import type { ColType, DataGridProps, PaginationType, SortType } from '../DataGrid/typings';
3
3
  import type { FilterProps } from '../Filter/typings';
4
- interface Props<RecordType, ParamsType extends Record<string, any>> extends Pick<DataGridProps<RecordType>, 'defaultColDef' | 'rowHeight' | 'cellDisplayFlex'> {
4
+ interface Props<RecordType, ParamsType extends Record<string, any>> extends Pick<DataGridProps<RecordType>, 'defaultColDef' | 'rowHeight' | 'cellDisplayFlex' | 'isRowSelectable'> {
5
5
  value?: RecordType[];
6
6
  onChange?: (value: RecordType[], rowDoubleClicked?: boolean) => void;
7
7
  /**
@@ -54,7 +54,8 @@ export default function SelectView(props) {
54
54
  readOnly = props.readOnly,
55
55
  defaultColDef = props.defaultColDef,
56
56
  rowHeight = props.rowHeight,
57
- cellDisplayFlex = props.cellDisplayFlex;
57
+ cellDisplayFlex = props.cellDisplayFlex,
58
+ isRowSelectable = props.isRowSelectable;
58
59
  var prefixCls = "".concat(PREFIX_CLS, "-select-view");
59
60
 
60
61
  var _useState = useState(value || emptyValue),
@@ -222,6 +223,7 @@ export default function SelectView(props) {
222
223
  rowHeight: rowHeight,
223
224
  defaultColDef: defaultColDef,
224
225
  cellDisplayFlex: cellDisplayFlex,
226
+ isRowSelectable: isRowSelectable,
225
227
  dataSource: rows,
226
228
  columns: columns,
227
229
  loading: loading,
@@ -7,10 +7,6 @@
7
7
  flex-direction: column;
8
8
  box-sizing: border-box;
9
9
  height: 100%;
10
-
11
- .@{ant-prefix}-tree-list-scrollbar-thumb {
12
- background: #ddd !important;
13
- }
14
10
  }
15
11
 
16
12
  &-menu-popover {
@@ -53,17 +49,13 @@
53
49
  &-body {
54
50
  min-height: 0;
55
51
  overflow: auto;
56
- .scrollBar(8px);
52
+ .scrollBar();
57
53
 
58
54
  .@{ant-prefix}-tree {
59
55
  &-list-holder-inner {
60
56
  align-items: stretch;
61
57
  }
62
58
 
63
- &-list-scrollbar-thumb {
64
- background: #ddd !important;
65
- }
66
-
67
59
  &-node-content-wrapper {
68
60
  min-width: 0;
69
61
  overflow-x: hidden;
package/es/init.js CHANGED
@@ -11,6 +11,7 @@ import { message, Modal, Select, ConfigProvider, Result, Button, DatePicker, Cas
11
11
  import React from 'react';
12
12
  import Icons from "./components/Icons";
13
13
  import PageLoading from "./components/PageLoading";
14
+ import { PREFIX_CLS } from "./constants";
14
15
  import empty from "./styles/empty.png";
15
16
  var Tip = Icons.Tip,
16
17
  Down = Icons.Down,
@@ -201,4 +202,9 @@ export default function init() {
201
202
  });
202
203
  }
203
204
  });
205
+ /** 设置滚动条 */
206
+
207
+ if (/windows/.test(window.navigator.userAgent.toLowerCase())) {
208
+ document.body.classList.add("".concat(PREFIX_CLS, "-thin-scroll-bar"));
209
+ }
204
210
  }
@@ -40,7 +40,7 @@ a[title='站长统计'] {
40
40
  }
41
41
 
42
42
  .@{ant-prefix}-table-body {
43
- .scrollBar(8px);
43
+ .scrollBar();
44
44
  }
45
45
 
46
46
  .@{ant-prefix}-table-tbody > tr.@{ant-prefix}-table-row-selected > td {
@@ -7,3 +7,23 @@
7
7
  html {
8
8
  --lemon-primary-color: 35, 87, 223;
9
9
  }
10
+
11
+ .@{prefixCls}-thin-scroll-bar {
12
+ ::-webkit-scrollbar {
13
+ width: 8px;
14
+ height: 8px;
15
+ }
16
+
17
+ ::-webkit-scrollbar-track {
18
+ background-color: transparent;
19
+ }
20
+
21
+ ::-webkit-scrollbar-thumb {
22
+ background-color: rgba(0, 0, 0, 0.3);
23
+ border-radius: 4px;
24
+
25
+ &:hover {
26
+ background-color: rgba(0, 0, 0, 0.5);
27
+ }
28
+ }
29
+ }
@@ -91,20 +91,20 @@
91
91
  }
92
92
 
93
93
  .scrollBar (@width: 8px) {
94
- scrollbar-width: thin;
95
-
96
- &::-webkit-scrollbar {
97
- width: @width;
98
- height: 8px;
99
- }
100
-
101
- &::-webkit-scrollbar-track {
102
- background-color: #fff;
103
- border-radius: 4px;
104
- }
105
-
106
- &::-webkit-scrollbar-thumb {
107
- background-color: #ddd;
108
- border-radius: 4px;
109
- }
94
+ // scrollbar-width: thin;
95
+
96
+ // &::-webkit-scrollbar {
97
+ // width: @width;
98
+ // height: 8px;
99
+ // }
100
+
101
+ // &::-webkit-scrollbar-track {
102
+ // background-color: #fff;
103
+ // border-radius: 4px;
104
+ // }
105
+
106
+ // &::-webkit-scrollbar-thumb {
107
+ // background-color: #ddd;
108
+ // border-radius: 4px;
109
+ // }
110
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemon-fe/kits",
3
- "version": "1.0.0-165",
3
+ "version": "1.0.0-167",
4
4
  "scripts": {
5
5
  "start": "dumi dev",
6
6
  "docs:build": "dumi build",