-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
168 additions
and
27 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
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,61 @@ | ||
--- | ||
title: Badge 徽标 | ||
--- | ||
|
||
## 示例 | ||
|
||
import { Badge, Button } from '@tarojsx/ui' | ||
import { UI } from '@/ui' | ||
|
||
```jsx title="数字" | ||
<Badge value={10}> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
|
||
<Badge value={100} maxValue={99}> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
``` | ||
|
||
<UI> | ||
<span style={{ marginRight: 60 }}> | ||
<Badge value={10}> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
</span> | ||
<span> | ||
<Badge value={100} maxValue={99}> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
</span> | ||
</UI> | ||
|
||
```jsx title="小红点" | ||
<Badge dot> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
``` | ||
|
||
<UI> | ||
<Badge dot> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
</UI> | ||
|
||
```jsx title="文字" | ||
<Badge value="NEW"> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
``` | ||
|
||
<UI> | ||
<Badge value="NEW"> | ||
<Button size="small">按钮</Button> | ||
</Badge> | ||
</UI> | ||
|
||
## API | ||
|
||
- [Taro UI 文档](https://taro-ui.jd.com/#/docs/badge) | ||
- [`<Badge />`](../modules/_badge_.md) | ||
- [`BadgeProps`](../interfaces/_badge_.badgeprops.md) |
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,57 @@ | ||
--- | ||
title: List 列表 | ||
--- | ||
|
||
## 示例 | ||
|
||
import { List, ListHeader, ListItem, Icon, Tag } from '@tarojsx/ui' | ||
import { Text } from '@tarojs/components' | ||
import { UI } from '@/ui' | ||
|
||
```jsx title="基本用法" | ||
<List> | ||
<ListHeader title="基本用法" /> | ||
<ListItem title="文字" /> | ||
<ListItem title="箭头" arrow="right" /> | ||
<ListItem title="文字" extra="详细信息" /> | ||
<ListItem title="禁用" disabled arrow="right" /> | ||
</List> | ||
``` | ||
|
||
```jsx title="高级用法" | ||
<List> | ||
<ListHeader title="高级用法" /> | ||
<ListItem title={<Text style={{ color: 'orange' }}>标题组件</Text>} extra={<Icon value="download" />} /> | ||
<ListItem title="子组件" arrow="right"> | ||
children | ||
</ListItem> | ||
</List> | ||
``` | ||
|
||
<UI phone title="列表"> | ||
<List> | ||
<ListHeader title="基本用法" /> | ||
<ListItem title="文字" /> | ||
<ListItem title="箭头" arrow="right" /> | ||
<ListItem title="文字" extra="详细信息" /> | ||
<ListItem title="禁用" disabled arrow="right" /> | ||
</List> | ||
<List> | ||
<ListHeader title="高级用法" /> | ||
<ListItem title={<Text style={{ color: 'orange' }}>标题组件</Text>} extra={<Icon value="download" />} /> | ||
<ListItem title="子组件" arrow="right"> | ||
{['TaroX', 'UI', 'ListItem'].map((c) => ( | ||
<Tag style={{ marginRight: 20 }} size="small"> | ||
{c} | ||
</Tag> | ||
))} | ||
</ListItem> | ||
<ListItem title="清除按钮" extra="2020-06-06" arrow="clear" onClear={() => alert('清除')} /> | ||
</List> | ||
</UI> | ||
|
||
## API | ||
|
||
- [Taro UI 文档](https://taro-ui.jd.com/#/docs/list) | ||
- [`<List />`](../modules/_list_.md) | ||
- [`ListProps`](../interfaces/_list_.listprops.md) |