forked from Tencent/tdesign-mobile-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
re Tencent#347
- Loading branch information
Showing
9 changed files
with
269 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
<template> | ||
<div> | ||
<div class="tdesign-demo-block"> | ||
<t-navbar> | ||
导航栏 - 带icon | ||
<template #right> | ||
<sound-icon></sound-icon> | ||
<t-navbar title="导航栏 - 带icon" left-icon home-icon> | ||
<template #right-icon> | ||
<ellipsis-icon /> | ||
</template> | ||
</t-navbar> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts" setup> | ||
import { SoundIcon } from 'tdesign-icons-vue-next'; | ||
import { EllipsisIcon } from 'tdesign-icons-vue-next'; | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### Navbar Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
animation | Boolean | true | \- | N | ||
background | String | - | background | N | ||
fixed | Boolean | true | \- | N | ||
homeIcon | Boolean / Slot / Function | - | homeIcon。Typescript:`boolean | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
leftIcon | Boolean / Slot / Function | false | Typescript:`boolean | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
rightIcon | Slot / Function | - | Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
title | String / Slot / Function | - | page title。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
titleMaxLength | Number | - | \- | N | ||
visible | Boolean | true | \- | N | ||
onHomeClick | Function | | Typescript:`() => void`<br/> | N | ||
onLeftClick | Function | | Typescript:`() => void`<br/> | N | ||
|
||
### Navbar Events | ||
|
||
name | params | description | ||
-- | -- | -- | ||
home-click | \- | \- | ||
left-click | \- | \- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
### Navbar Props | ||
|
||
| 属性 | 类型 | 默认值 | 必传 | 说明 | | ||
| --------- | ------- | ------ | ---- | --------------------------- | | ||
| title | String | 导航栏 | N | 标题文字 | | ||
| leftArrow | Boolean | true | N | 是否展示左箭头 | | ||
| maxLen | Number | 6 | N | 标题文字长度,多余展示`...` | | ||
| rightShow | Boolean | true | N | 是否展示右侧更多按钮 | | ||
名称 | 类型 | 默认值 | 说明 | 必传 | ||
-- | -- | -- | -- | -- | ||
animation | Boolean | true | 是否添加动画效果 | N | ||
background | String | - | 背景 | N | ||
fixed | Boolean | true | 是否固定在顶部 | N | ||
homeIcon | Boolean / Slot / Function | - | 首页图标。值为 true 表示显示默认返回图标,值为 false 表示不显示首页图标,值为其他表示自定义图标。TS 类型:`boolean | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
leftIcon | Boolean / Slot / Function | false | 左侧图标。值为 true 表示显示默认返回图标,值为 false 表示不显示左侧图标,值为其他表示自定义图标。TS 类型:`boolean | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
rightIcon | Slot / Function | - | 右侧图标,可自定义。TS 类型:`TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
title | String / Slot / Function | - | 页面标题。TS 类型:`string | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-vue/blob/develop/src/common.ts) | N | ||
titleMaxLength | Number | - | 标题文字最大长度,超出的范围使用 `...` 表示 | N | ||
visible | Boolean | true | 是否显示 | N | ||
onHomeClick | Function | | TS 类型:`() => void`<br/>点击 home 图标时触发 | N | ||
onLeftClick | Function | | TS 类型:`() => void`<br/>点击左边按钮时触发 | N | ||
|
||
## Event | ||
### Navbar Events | ||
|
||
| 事件名 | 说明 | 回调参数 | | ||
| ----------- | ----------------- | -------- | | ||
| click-right | 点击右侧更多 icon | event | | ||
| click-text | 点击标题文字 | event | | ||
|
||
## Slot | ||
|
||
| 插槽名 | 说明 | | ||
| ------ | ---------------- | | ||
| left | 自定义左侧关闭按钮 | | ||
| right | 自定义右侧icon | | ||
| - | 默认title文案 | | ||
名称 | 参数 | 描述 | ||
-- | -- | -- | ||
home-click | \- | 点击 home 图标时触发 | ||
left-click | \- | 点击左边按钮时触发 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.