feat(Search): add new external classes field-class、input-class @rex-zsd (#946)

This commit is contained in:
rex 2018-11-24 11:29:33 +08:00 committed by neverland
parent 1186fb24d5
commit f9a9c8ccdc
4 changed files with 7 additions and 3 deletions

View File

@ -83,6 +83,8 @@ Search 支持自定义右侧取消按钮,使用名字为 action 的 slot 即
| 类名 | 说明 |
|-----------|-----------|
| custom-class | 根节点样式类 |
| field-class | 搜索框样式类 |
| input-class | 输入框样式类 |
| cancel-class | 取消按钮样式类 |
### 更新日志

View File

@ -7,8 +7,9 @@
box-sizing: border-box;
&__field {
flex: 1;
overflow: hidden;
border-radius: 4px;
flex: 1;
&__left-icon {
color: @gray-dark;

View File

@ -3,7 +3,7 @@ import { VantComponent } from '../common/component';
VantComponent({
field: true,
classes: ['cancel-class'],
classes: ['field-class', 'input-class', 'cancel-class'],
props: {
focus: Boolean,

View File

@ -10,12 +10,13 @@
error="{{ error }}"
border="{{ false }}"
confirm-type="search"
class="van-search__field"
class="van-search__field field-class"
value="{{ value }}"
disabled="{{ disabled }}"
readonly="{{ readony }}"
maxlength="{{ maxlength }}"
input-align="{{ inputAlign }}"
input-class="input-class"
placeholder="{{ placeholder }}"
placeholder-style="{{ placeholderStyle }}"
custom-style="padding: 3px 10px"