-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2746 from XiaoMi/feature/check-select/2743
feat(tag-input&check-select): add prefix and suffix api (#2743)
- Loading branch information
Showing
7 changed files
with
95 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@hi-ui/hiui": patch | ||
--- | ||
|
||
feat(tag-input&check-select): add prefix api |
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,6 @@ | ||
--- | ||
"@hi-ui/check-select": minor | ||
"@hi-ui/tag-input": minor | ||
--- | ||
|
||
feat: add prefix api |
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,42 @@ | ||
import React from 'react' | ||
import CheckSelect from '../src' | ||
import { AppStoreOutlined, InfoCircleOutlined } from '@hi-ui/icons' | ||
|
||
/** | ||
* @title 前后内置元素 | ||
* @desc 将选择框与内置的其他元素组合使用 | ||
*/ | ||
export const Addon = () => { | ||
const [data] = React.useState([ | ||
{ title: '手机', id: '2' }, | ||
{ title: '小米2', id: '2-1' }, | ||
{ title: '小米3', id: '2-2' }, | ||
{ title: '小米4', id: '2-3' }, | ||
{ title: '小米5', id: '2-4' }, | ||
{ title: '电脑', id: '3' }, | ||
{ title: '笔记本', id: '4' }, | ||
{ | ||
title: '生活周边超长文案展示超长文案展示超长文案展示超长文案展示超长文案展示', | ||
id: '5', | ||
}, | ||
{ title: '其它', id: '6' }, | ||
]) | ||
|
||
return ( | ||
<> | ||
<h1>Addon</h1> | ||
<div className="check-select-addon__wrap"> | ||
<CheckSelect | ||
style={{ width: 240 }} | ||
placeholder="请选择" | ||
searchable | ||
// clearable={false} | ||
data={data} | ||
tagInputProps={{ wrap: true }} | ||
prefix={<AppStoreOutlined />} | ||
suffix={<InfoCircleOutlined style={{ marginRight: 8 }} />} | ||
/> | ||
</div> | ||
</> | ||
) | ||
} |
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