mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Search): add new external classes field-class、input-class @rex-zsd (#946)
This commit is contained in:
parent
1186fb24d5
commit
f9a9c8ccdc
@ -83,6 +83,8 @@ Search 支持自定义右侧取消按钮,使用名字为 action 的 slot 即
|
||||
| 类名 | 说明 |
|
||||
|-----------|-----------|
|
||||
| custom-class | 根节点样式类 |
|
||||
| field-class | 搜索框样式类 |
|
||||
| input-class | 输入框样式类 |
|
||||
| cancel-class | 取消按钮样式类 |
|
||||
|
||||
### 更新日志
|
||||
|
@ -7,8 +7,9 @@
|
||||
box-sizing: border-box;
|
||||
|
||||
&__field {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
border-radius: 4px;
|
||||
flex: 1;
|
||||
|
||||
&__left-icon {
|
||||
color: @gray-dark;
|
||||
|
@ -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,
|
||||
|
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user