@hsu-react/ui 2.2.6 → 2.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/es/components/Table/index.module.scss +13 -8
- package/es/layout/NavTabBar/index.js +14 -15
- package/lib/components/Table/index.module.scss +13 -8
- package/lib/layout/NavTabBar/index.js +13 -14
- package/package.json +1 -1
- package/src/components/Table/index.module.scss +13 -8
- package/src/layout/NavTabBar/index.tsx +13 -13
|
@@ -294,7 +294,13 @@
|
|
|
294
294
|
height: 100%;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
// 这里原本写的是 `.ant-spin-nested-loading` —— antd v5 里 Spin 包裹子节点时的那层
|
|
298
|
+
// 类名。v6 把它删了(现在包裹层只有 `.ant-spin`),于是**整段滚动布局一条都不命中**,
|
|
299
|
+
// 表体拿不到 `flex: 1` 与 `overflow-y: auto`,纵向滚动直接消失,而且不报错。
|
|
300
|
+
//
|
|
301
|
+
// 改用直接子选择器:wrapper 下本来就只有这一个包裹层,不写死它叫什么,
|
|
302
|
+
// v5 / v6 都命中,将来 antd 再改名也不会又静默失效。
|
|
303
|
+
:global(.ant-table-wrapper) > * {
|
|
298
304
|
width: 100%;
|
|
299
305
|
height: 100%;
|
|
300
306
|
|
|
@@ -344,13 +350,12 @@
|
|
|
344
350
|
}
|
|
345
351
|
|
|
346
352
|
&.y-unScroll {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
353
|
+
// 同上:不再经过 v5 才有的 .ant-spin-nested-loading
|
|
354
|
+
:global(.ant-spin-container) {
|
|
355
|
+
:global(.ant-table) {
|
|
356
|
+
:global(.ant-table-container) {
|
|
357
|
+
> :global(.ant-table-body) {
|
|
358
|
+
overflow-y: visible !important;
|
|
354
359
|
}
|
|
355
360
|
}
|
|
356
361
|
}
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { Tabs as AntdTabs
|
|
13
|
+
import { Tabs as AntdTabs } from "antd";
|
|
14
14
|
import React, { useCallback, useMemo, useState } from "react";
|
|
15
15
|
import { useNavigate } from "react-router";
|
|
16
16
|
import { closestCenter, DndContext, PointerSensor, useSensor } from "@dnd-kit/core";
|
|
@@ -148,20 +148,19 @@ var NavTabBar = function NavTabBar(props) {
|
|
|
148
148
|
tabBarExtraContent: showReload ? {
|
|
149
149
|
left:
|
|
150
150
|
/*#__PURE__*/
|
|
151
|
-
//
|
|
152
|
-
//
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
})
|
|
151
|
+
// 不加悬浮提示:图标含义直白,一颗 28px 的按钮顶出一块深色气泡反而抢眼。
|
|
152
|
+
// 文案只留在 aria-label 上给读屏用。
|
|
153
|
+
// 另注意不能改用 Button 的 title —— 本库的 Button 把 title 当作 children
|
|
154
|
+
// 的兜底(children ?? title),传了会把文案画进按钮里
|
|
155
|
+
_jsx(Button, {
|
|
156
|
+
className: styles.reload,
|
|
157
|
+
type: "text",
|
|
158
|
+
size: "small",
|
|
159
|
+
"aria-label": "\u5237\u65B0\u5F53\u524D\u9875",
|
|
160
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
161
|
+
icon: "ep:refresh"
|
|
162
|
+
}),
|
|
163
|
+
onClick: reloadCurrent
|
|
165
164
|
})
|
|
166
165
|
} : undefined,
|
|
167
166
|
hideAdd: true,
|
|
@@ -294,7 +294,13 @@
|
|
|
294
294
|
height: 100%;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
// 这里原本写的是 `.ant-spin-nested-loading` —— antd v5 里 Spin 包裹子节点时的那层
|
|
298
|
+
// 类名。v6 把它删了(现在包裹层只有 `.ant-spin`),于是**整段滚动布局一条都不命中**,
|
|
299
|
+
// 表体拿不到 `flex: 1` 与 `overflow-y: auto`,纵向滚动直接消失,而且不报错。
|
|
300
|
+
//
|
|
301
|
+
// 改用直接子选择器:wrapper 下本来就只有这一个包裹层,不写死它叫什么,
|
|
302
|
+
// v5 / v6 都命中,将来 antd 再改名也不会又静默失效。
|
|
303
|
+
:global(.ant-table-wrapper) > * {
|
|
298
304
|
width: 100%;
|
|
299
305
|
height: 100%;
|
|
300
306
|
|
|
@@ -344,13 +350,12 @@
|
|
|
344
350
|
}
|
|
345
351
|
|
|
346
352
|
&.y-unScroll {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
353
|
+
// 同上:不再经过 v5 才有的 .ant-spin-nested-loading
|
|
354
|
+
:global(.ant-spin-container) {
|
|
355
|
+
:global(.ant-table) {
|
|
356
|
+
:global(.ant-table-container) {
|
|
357
|
+
> :global(.ant-table-body) {
|
|
358
|
+
overflow-y: visible !important;
|
|
354
359
|
}
|
|
355
360
|
}
|
|
356
361
|
}
|
|
@@ -139,20 +139,19 @@ const NavTabBar = props => {
|
|
|
139
139
|
tabBarExtraContent: showReload ? {
|
|
140
140
|
left:
|
|
141
141
|
/*#__PURE__*/
|
|
142
|
-
//
|
|
143
|
-
//
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
})
|
|
142
|
+
// 不加悬浮提示:图标含义直白,一颗 28px 的按钮顶出一块深色气泡反而抢眼。
|
|
143
|
+
// 文案只留在 aria-label 上给读屏用。
|
|
144
|
+
// 另注意不能改用 Button 的 title —— 本库的 Button 把 title 当作 children
|
|
145
|
+
// 的兜底(children ?? title),传了会把文案画进按钮里
|
|
146
|
+
(0, _jsxRuntime.jsx)(_Button.default, {
|
|
147
|
+
className: _indexModule.default.reload,
|
|
148
|
+
type: "text",
|
|
149
|
+
size: "small",
|
|
150
|
+
"aria-label": "\u5237\u65B0\u5F53\u524D\u9875",
|
|
151
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.default, {
|
|
152
|
+
icon: "ep:refresh"
|
|
153
|
+
}),
|
|
154
|
+
onClick: reloadCurrent
|
|
156
155
|
})
|
|
157
156
|
} : undefined,
|
|
158
157
|
hideAdd: true,
|
package/package.json
CHANGED
|
@@ -294,7 +294,13 @@
|
|
|
294
294
|
height: 100%;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
-
|
|
297
|
+
// 这里原本写的是 `.ant-spin-nested-loading` —— antd v5 里 Spin 包裹子节点时的那层
|
|
298
|
+
// 类名。v6 把它删了(现在包裹层只有 `.ant-spin`),于是**整段滚动布局一条都不命中**,
|
|
299
|
+
// 表体拿不到 `flex: 1` 与 `overflow-y: auto`,纵向滚动直接消失,而且不报错。
|
|
300
|
+
//
|
|
301
|
+
// 改用直接子选择器:wrapper 下本来就只有这一个包裹层,不写死它叫什么,
|
|
302
|
+
// v5 / v6 都命中,将来 antd 再改名也不会又静默失效。
|
|
303
|
+
:global(.ant-table-wrapper) > * {
|
|
298
304
|
width: 100%;
|
|
299
305
|
height: 100%;
|
|
300
306
|
|
|
@@ -344,13 +350,12 @@
|
|
|
344
350
|
}
|
|
345
351
|
|
|
346
352
|
&.y-unScroll {
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
}
|
|
353
|
+
// 同上:不再经过 v5 才有的 .ant-spin-nested-loading
|
|
354
|
+
:global(.ant-spin-container) {
|
|
355
|
+
:global(.ant-table) {
|
|
356
|
+
:global(.ant-table-container) {
|
|
357
|
+
> :global(.ant-table-body) {
|
|
358
|
+
overflow-y: visible !important;
|
|
354
359
|
}
|
|
355
360
|
}
|
|
356
361
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Tabs as AntdTabs
|
|
1
|
+
import { Tabs as AntdTabs } from "antd";
|
|
2
2
|
import React, { ReactNode, useCallback, useMemo, useState } from "react";
|
|
3
3
|
import { useNavigate } from "react-router";
|
|
4
4
|
import type { DragEndEvent, DragStartEvent } from "@dnd-kit/core";
|
|
@@ -182,18 +182,18 @@ const NavTabBar: React.FC<NavTabBarProps> = (props) => {
|
|
|
182
182
|
showReload
|
|
183
183
|
? {
|
|
184
184
|
left: (
|
|
185
|
-
//
|
|
186
|
-
//
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
// 不加悬浮提示:图标含义直白,一颗 28px 的按钮顶出一块深色气泡反而抢眼。
|
|
186
|
+
// 文案只留在 aria-label 上给读屏用。
|
|
187
|
+
// 另注意不能改用 Button 的 title —— 本库的 Button 把 title 当作 children
|
|
188
|
+
// 的兜底(children ?? title),传了会把文案画进按钮里
|
|
189
|
+
<Button
|
|
190
|
+
className={styles.reload}
|
|
191
|
+
type="text"
|
|
192
|
+
size="small"
|
|
193
|
+
aria-label="刷新当前页"
|
|
194
|
+
icon={<Icon icon="ep:refresh" />}
|
|
195
|
+
onClick={reloadCurrent}
|
|
196
|
+
/>
|
|
197
197
|
),
|
|
198
198
|
}
|
|
199
199
|
: undefined
|