Skip to content

Commit

Permalink
docs(tabBar): update tabBar icon attr
Browse files Browse the repository at this point in the history
  • Loading branch information
jarmywang committed Apr 24, 2023
1 parent 24cb4a0 commit 999b720
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 15 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,10 @@ lerna-debug.log*

.DS_Store
.vscode
.idea
node_modules
dist
temp

package-lock.json
yarn.lock

# editor
.idea/
.vscode/
Binary file modified db/TDesign.db
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default {
badgeProps: {
type: Object as PropType<TdTabBarItemProps['badgeProps']>,
},
/** 图标名称。传入对象时透传至 Icon 组件 */
/** 图标名称 */
icon: {
type: [String, Object, Function] as PropType<TdTabBarItemProps['icon']>,
type: Function as PropType<TdTabBarItemProps['icon']>,
},
/** 二级菜单 */
subTabBar: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ change | `(value: string \| number)` | \-
name | type | default | description | required
-- | -- | -- | -- | --
badgeProps | Object | - | Typescript:`BadgeProps`[Badge API Documents](./badge?tab=api)[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tab-bar/type.ts) | N
icon | String / Object / Slot / Function | - | Typescript:`string \| object \| TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
icon | Slot / Function | - | Typescript:`TNode`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
subTabBar | Array | - | Typescript:`SubTabBarItem[] ` `interface SubTabBarItem { value: string; label: string }`[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tab-bar/type.ts) | N
value | String / Number | - | \- | N
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ change | `(value: string \| number)` | 选中标签切换时触发
名称 | 类型 | 默认值 | 说明 | 必传
-- | -- | -- | -- | --
badgeProps | Object | - | 图标右上角提示信息。TS 类型:`BadgeProps`[Badge API Documents](./badge?tab=api)[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tab-bar/type.ts) | N
icon | String / Object / Slot / Function | - | 图标名称。传入对象时透传至 Icon 组件。TS 类型:`string \| object \| TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
icon | Slot / Function | - | 图标名称。TS 类型:`TNode`[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N
subTabBar | Array | - | 二级菜单。TS 类型:`SubTabBarItem[] ` `interface SubTabBarItem { value: string; label: string }`[详细类型定义](https://github.com/Tencent/tdesign-mobile-vue/tree/develop/src/tab-bar/type.ts) | N
value | String / Number | - | 标识符 | N
4 changes: 2 additions & 2 deletions packages/products/tdesign-mobile-vue/src/tab-bar/type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ export interface TdTabBarItemProps {
*/
badgeProps?: BadgeProps;
/**
* 图标名称。传入对象时透传至 Icon 组件
* 图标名称
*/
icon?: string | object | TNode;
icon?: TNode;
/**
* 二级菜单
*/
Expand Down
6 changes: 1 addition & 5 deletions packages/scripts/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -92088,13 +92088,11 @@
"field_category": 1,
"field_name": "icon",
"field_type": [
"1",
"8",
"64"
],
"field_default_value": "",
"field_enum": "",
"field_desc_zh": "图标名称。传入对象时透传至 Icon 组件",
"field_desc_zh": "图标名称",
"field_desc_en": null,
"field_required": 0,
"event_input": "",
Expand All @@ -92115,8 +92113,6 @@
"Vue(Mobile)"
],
"field_type_text": [
"String",
"Object",
"TNode"
]
},
Expand Down

0 comments on commit 999b720

Please sign in to comment.