-
Notifications
You must be signed in to change notification settings - Fork 363
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 新增 input-adornment 组件 * feat: update common
- Loading branch information
1 parent
ab7380d
commit 8330d9b
Showing
24 changed files
with
365 additions
and
155 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,43 @@ | ||
<template> | ||
<div class="tdesign-demo-block-column" style="max-width: 500px"> | ||
<t-input-adornment :prepend="protocolSelect"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-input-adornment> | ||
|
||
<t-input-adornment :append="tldSelect"> | ||
<t-tag-input placeholder="请输入内容" /> | ||
</t-input-adornment> | ||
|
||
<t-input-adornment :prepend="protocolSelect" :append="tldSelect"> | ||
<t-select | ||
:options="['tencent', 'qq', 'cloud.tencent'].map((value) => ({ label: value, value }))" | ||
defaultValue="tencent" | ||
/> | ||
</t-input-adornment> | ||
</div> | ||
</template> | ||
|
||
<script lang="jsx"> | ||
export default { | ||
data() { | ||
return { | ||
protocolSelect: () => ( | ||
<t-select | ||
bordered={false} | ||
autoWidth | ||
options={['http://', 'https://'].map((value) => ({ label: value, value }))} | ||
defaultValue="http://" | ||
/> | ||
), | ||
tldSelect: () => ( | ||
<t-select | ||
bordered={false} | ||
autoWidth | ||
options={['.com', '.cn', '.net', '.org'].map((value) => ({ label: value, value }))} | ||
defaultValue=".cn" | ||
/> | ||
), | ||
}; | ||
}, | ||
}; | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<div class="tdesign-demo-block-column" style="max-width: 500px"> | ||
<t-input-adornment prepend="http://"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-input-adornment> | ||
|
||
<t-input-adornment append=".com"> | ||
<t-tag-input placeholder="请输入内容" /> | ||
</t-input-adornment> | ||
|
||
<t-input-adornment prepend="http://" append=".com"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-input-adornment> | ||
</div> | ||
</template> |
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,10 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### InputAdornment Props | ||
|
||
name | type | default | description | required | ||
-- | -- | -- | -- | -- | ||
append | String / Slot / Function | - | The suffix decoration。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N | ||
prepend | String / Slot / Function | - | The prefix decoration。Typescript:`string | TNode`。[see more ts definition](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
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,10 @@ | ||
:: BASE_DOC :: | ||
|
||
## API | ||
|
||
### InputAdornment Props | ||
|
||
名称 | 类型 | 默认值 | 说明 | 必传 | ||
-- | -- | -- | -- | -- | ||
append | String / Slot / Function | - | 后缀装饰。TS 类型:`string | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N | ||
prepend | String / Slot / Function | - | 前缀装饰。TS 类型:`string | TNode`。[通用类型定义](https://github.com/Tencent/tdesign-vue/blob/develop/src/common.ts) | N |
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,15 +1,15 @@ | ||
<template> | ||
<div class="tdesign-demo-block-column" style="max-width: 500px"> | ||
<t-addon prepend="http://"> | ||
<t-input-adornment prepend="http://"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-addon> | ||
</t-input-adornment> | ||
|
||
<t-addon append=".com"> | ||
<t-input-adornment append=".com"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-addon> | ||
</t-input-adornment> | ||
|
||
<t-addon prepend="http://" append=".com"> | ||
<t-input-adornment prepend="http://" append=".com"> | ||
<t-input placeholder="请输入内容" /> | ||
</t-addon> | ||
</t-input-adornment> | ||
</div> | ||
</template> |
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
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
Oops, something went wrong.