From 0b7605f3ef2ca11cedc2cc61a3eb93e0757e6b86 Mon Sep 17 00:00:00 2001 From: Moonofweisheng <1780903673@qq.com> Date: Tue, 19 Nov 2024 12:56:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E2=9C=A8=20Tabs=20=E6=96=B0=E5=A2=9Ema?= =?UTF-8?q?p-title=E5=B1=9E=E6=80=A7=E6=94=AF=E6=8C=81=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=BC=E8=88=AA=E5=9C=B0=E5=9B=BE=E6=A0=87=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: #670 --- docs/component/tabs.md | 1 + src/uni_modules/wot-design-uni/components/wd-tabs/types.ts | 4 ++++ src/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/component/tabs.md b/docs/component/tabs.md index 4415adeb..54f71dd3 100644 --- a/docs/component/tabs.md +++ b/docs/component/tabs.md @@ -172,6 +172,7 @@ const tab = ref('Design') | v-model | 绑定值 | string / number | - | - | - | | slidable-num | 可滑动的标签数阈值,`slidable`设置为`auto`时生效 | number | - | 6 | - | | map-num | 显示导航地图的标签数阈值 | number | - | 10 | - | +| map-title | 导航地图标题 | string | - | - | $LOWEST_VERSION$ | | sticky | 粘性布局 | boolean | - | false | - | | offset-top | 粘性布局时距离窗口顶部距离 | number | - | 0 | - | | swipeable | 开启手势滑动 | boolean | - | false | - | diff --git a/src/uni_modules/wot-design-uni/components/wd-tabs/types.ts b/src/uni_modules/wot-design-uni/components/wd-tabs/types.ts index 0766c600..45457486 100644 --- a/src/uni_modules/wot-design-uni/components/wd-tabs/types.ts +++ b/src/uni_modules/wot-design-uni/components/wd-tabs/types.ts @@ -31,6 +31,10 @@ export const tabsProps = { * 标签数超过阈值显示导航地图 */ mapNum: makeNumberProp(10), + /** + * 导航地图的标题 + */ + mapTitle: String, /** * 粘性布局 */ diff --git a/src/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue b/src/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue index d6e269d9..b961904a 100644 --- a/src/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue +++ b/src/uni_modules/wot-design-uni/components/wd-tabs/wd-tabs.vue @@ -35,7 +35,7 @@ - {{ translate('all') }} + {{ mapTitle || translate('all') }}