@hsu-react/ui 2.2.6 → 2.2.7
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/layout/NavTabBar/index.js +14 -15
- package/lib/layout/NavTabBar/index.js +13 -14
- package/package.json +1 -1
- package/src/layout/NavTabBar/index.tsx +13 -13
|
@@ -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,
|
|
@@ -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
|
@@ -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
|