mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Search): add action-text prop (#2057)
This commit is contained in:
parent
31558541c2
commit
86ed4f6b3a
@ -61,6 +61,7 @@
|
|||||||
| value | 当前输入的值 | *string \| number* | - | - |
|
| value | 当前输入的值 | *string \| number* | - | - |
|
||||||
| background | 搜索框背景色 | *string* | `#f2f2f2` | - |
|
| background | 搜索框背景色 | *string* | `#f2f2f2` | - |
|
||||||
| show-action | 是否在搜索框右侧显示取消按钮 | *boolean* | `false` | - |
|
| show-action | 是否在搜索框右侧显示取消按钮 | *boolean* | `false` | - |
|
||||||
|
| action-text | 取消按钮文字 | *boolean* | `取消` | 1.0.0 |
|
||||||
| focus | 获取焦点 | *boolean* | `false` | - |
|
| focus | 获取焦点 | *boolean* | `false` | - |
|
||||||
| error | 是否将输入内容标红 | *boolean* | `false` | - |
|
| error | 是否将输入内容标红 | *boolean* | `false` | - |
|
||||||
| disabled | 是否禁用输入框 | *boolean* | `false` | - |
|
| disabled | 是否禁用输入框 | *boolean* | `false` | - |
|
||||||
|
@ -17,6 +17,10 @@ VantComponent({
|
|||||||
useActionSlot: Boolean,
|
useActionSlot: Boolean,
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
placeholderStyle: String,
|
placeholderStyle: String,
|
||||||
|
actionText: {
|
||||||
|
type: String,
|
||||||
|
value: '取消'
|
||||||
|
},
|
||||||
background: {
|
background: {
|
||||||
type: String,
|
type: String,
|
||||||
value: '#ffffff'
|
value: '#ffffff'
|
||||||
|
@ -41,6 +41,6 @@
|
|||||||
hover-stay-time="70"
|
hover-stay-time="70"
|
||||||
>
|
>
|
||||||
<slot wx:if="{{ useActionSlot }}" name="action" />
|
<slot wx:if="{{ useActionSlot }}" name="action" />
|
||||||
<view wx:else bind:tap="onCancel" class="cancel-class">取消</view>
|
<view wx:else bind:tap="onCancel" class="cancel-class">{{ actionText }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user