Skip to content

Commit b14c74e

Browse files
committed
docs(TabbarItem): add url and linkType props
1 parent 215d942 commit b14c74e

6 files changed

Lines changed: 10 additions & 8 deletions

File tree

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-miniprogram/packages/components/tab-bar-item/props.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const props: TdTabBarItemProps = {
1717
/** 页面跳转类型 */
1818
linkType: {
1919
type: String,
20+
value: 'redirectTo',
2021
},
2122
/** 二级菜单 */
2223
subTabBar: {

packages/products/tdesign-miniprogram/packages/components/tab-bar-item/type.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,11 @@ export interface TdTabBarItemProps {
2323
};
2424
/**
2525
* 页面跳转类型
26+
* @default redirectTo
2627
*/
2728
linkType?: {
2829
type: StringConstructor;
29-
value?: 'redirectTo' | 'switchTab' | 'reLaunch';
30+
value?: 'redirectTo' | 'switchTab' | 'reLaunch' | 'navigateTo';
3031
};
3132
/**
3233
* 二级菜单

packages/products/tdesign-miniprogram/packages/components/tab-bar/README.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ style | Object | - | CSS(Cascading Style Sheets) | N
4141
custom-style | Object | - | CSS(Cascading Style Sheets),used to set style on virtual component | N
4242
badge-props | Object | - | Typescript: `BadgeProps`[Badge API Documents](./badge?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/tab-bar-item/type.ts) | N
4343
icon | String / Object | - | \- | N
44-
link-type | String | - | `1.15.2`。options: redirectTo/switchTab/reLaunch | N
44+
link-type | String | redirectTo | `1.15.2`。options: redirectTo/switchTab/reLaunch/navigateTo | N
4545
sub-tab-bar | Array | - | Typescript: `SubTabBarItem[] ` `interface SubTabBarItem { value: string; label: string }`[see more ts definition](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/tab-bar-item/type.ts) | N
46-
url | String | - | `1.15.2` | N
46+
url | String | '' | `1.15.2` | N
4747
value | String / Number | - | \- | N
4848

4949
### TabBarItem Slots

packages/products/tdesign-miniprogram/packages/components/tab-bar/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ style | Object | - | 样式 | N
4141
custom-style | Object | - | 样式,一般用于开启虚拟化组件节点场景 | N
4242
badge-props | Object | - | 图标右上角提示信息。TS 类型:`BadgeProps`[Badge API Documents](./badge?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/tab-bar-item/type.ts) | N
4343
icon | String / Object | - | 图标名称。传入对象时透传至 Icon 组件 | N
44-
link-type | String | - | `1.15.2`。页面跳转类型。可选项:redirectTo/switchTab/reLaunch | N
44+
link-type | String | redirectTo | `1.15.2`。页面跳转类型。可选项:redirectTo/switchTab/reLaunch/navigateTo | N
4545
sub-tab-bar | Array | - | 二级菜单。TS 类型:`SubTabBarItem[] ` `interface SubTabBarItem { value: string; label: string }`[详细类型定义](https://github.com/Tencent/tdesign-miniprogram/blob/develop/packages/components/tab-bar-item/type.ts) | N
46-
url | String | - | `1.15.2`。点击后跳转的页面路径, 需要以 `/` 开头 | N
46+
url | String | '' | `1.15.2`。点击后跳转的页面路径, 需要以 `/` 开头 | N
4747
value | String / Number | - | 标识符 | N
4848

4949
### TabBarItem Slots

packages/scripts/api.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128484,8 +128484,8 @@
128484128484
"field_type": [
128485128485
"1"
128486128486
],
128487-
"field_default_value": "",
128488-
"field_enum": "redirectTo/switchTab/reLaunch",
128487+
"field_default_value": "redirectTo",
128488+
"field_enum": "redirectTo/switchTab/reLaunch/navigateTo",
128489128489
"field_desc_zh": "页面跳转类型",
128490128490
"field_desc_en": null,
128491128491
"field_required": 0,
@@ -128564,7 +128564,7 @@
128564128564
"field_type": [
128565128565
"1"
128566128566
],
128567-
"field_default_value": "",
128567+
"field_default_value": "''",
128568128568
"field_enum": "",
128569128569
"field_desc_zh": "点击后跳转的页面路径, 需要以 `/` 开头",
128570128570
"field_desc_en": null,

0 commit comments

Comments
 (0)