mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
feat(Field): add arrow-direction prop (#1948)
This commit is contained in:
parent
982dcd7a88
commit
22ad214714
@ -27,6 +27,7 @@
|
|||||||
##### Field
|
##### Field
|
||||||
|
|
||||||
- 新增`clickable`属性
|
- 新增`clickable`属性
|
||||||
|
- 新增`arrow-direction`属性
|
||||||
|
|
||||||
##### Popup
|
##### Popup
|
||||||
|
|
||||||
|
@ -16,20 +16,5 @@ Page({
|
|||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '点击图标'
|
title: '点击图标'
|
||||||
});
|
});
|
||||||
},
|
|
||||||
|
|
||||||
onFieldChange({ detail }) {
|
|
||||||
console.log('change', detail);
|
|
||||||
this.setData({
|
|
||||||
sms: detail
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
onFieldBlur({ detail }) {
|
|
||||||
console.log('blur', detail);
|
|
||||||
},
|
|
||||||
|
|
||||||
onSendSms() {
|
|
||||||
console.log('onSendSms', this.data.sms);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -81,10 +81,8 @@
|
|||||||
placeholder="请输入短信验证码"
|
placeholder="请输入短信验证码"
|
||||||
use-button-slot
|
use-button-slot
|
||||||
border="{{ false }}"
|
border="{{ false }}"
|
||||||
bind:change="onFieldChange"
|
|
||||||
bind:blur="onFieldBlur"
|
|
||||||
>
|
>
|
||||||
<van-button slot="button" size="small" type="primary" custom-class="button" bind:tap="onSendSms">发送验证码</van-button>
|
<van-button slot="button" size="small" type="primary" custom-class="button">发送验证码</van-button>
|
||||||
</van-field>
|
</van-field>
|
||||||
</van-cell-group>
|
</van-cell-group>
|
||||||
</demo-block>
|
</demo-block>
|
||||||
|
@ -185,6 +185,7 @@ Page({
|
|||||||
| placeholder-style | 指定 placeholder 的样式 | *string* | - |
|
| placeholder-style | 指定 placeholder 的样式 | *string* | - |
|
||||||
| custom-style | 自定义样式 | *string* | - |
|
| custom-style | 自定义样式 | *string* | - |
|
||||||
| is-link | 是否展示右侧箭头并开启点击反馈 | *boolean* | `false` |
|
| is-link | 是否展示右侧箭头并开启点击反馈 | *boolean* | `false` |
|
||||||
|
| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | *string* | - |
|
||||||
| error | 是否将输入内容标红 | *boolean* | `false` |
|
| error | 是否将输入内容标红 | *boolean* | `false` |
|
||||||
| error-message | 底部错误提示文案,为空时不展示 | *string* | `''` |
|
| error-message | 底部错误提示文案,为空时不展示 | *string* | `''` |
|
||||||
| error-message-align | 底部错误提示文案对齐方式,可选值为 `center` `right` | *string* | `''` |
|
| error-message-align | 底部错误提示文案对齐方式,可选值为 `center` `right` | *string* | `''` |
|
||||||
|
@ -27,11 +27,12 @@ VantComponent({
|
|||||||
clearable: Boolean,
|
clearable: Boolean,
|
||||||
clickable: Boolean,
|
clickable: Boolean,
|
||||||
inputAlign: String,
|
inputAlign: String,
|
||||||
|
placeholder: String,
|
||||||
customStyle: String,
|
customStyle: String,
|
||||||
confirmType: String,
|
confirmType: String,
|
||||||
confirmHold: Boolean,
|
confirmHold: Boolean,
|
||||||
errorMessage: String,
|
errorMessage: String,
|
||||||
placeholder: String,
|
arrowDirection: String,
|
||||||
placeholderStyle: String,
|
placeholderStyle: String,
|
||||||
errorMessageAlign: String,
|
errorMessageAlign: String,
|
||||||
selectionEnd: {
|
selectionEnd: {
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<wxs src="../wxs/utils.wxs" module="utils" />
|
<wxs src="../wxs/utils.wxs" module="utils" />
|
||||||
|
|
||||||
<van-cell
|
<van-cell
|
||||||
|
size="{{ size }}"
|
||||||
icon="{{ leftIcon }}"
|
icon="{{ leftIcon }}"
|
||||||
title="{{ label }}"
|
title="{{ label }}"
|
||||||
center="{{ center }}"
|
center="{{ center }}"
|
||||||
@ -8,10 +9,10 @@
|
|||||||
is-link="{{ isLink }}"
|
is-link="{{ isLink }}"
|
||||||
required="{{ required }}"
|
required="{{ required }}"
|
||||||
clickable="{{ clickable }}"
|
clickable="{{ clickable }}"
|
||||||
custom-style="{{ customStyle }}"
|
|
||||||
title-width="{{ titleWidth }}"
|
title-width="{{ titleWidth }}"
|
||||||
|
custom-style="{{ customStyle }}"
|
||||||
|
arrow-direction="{{ arrowDirection }}"
|
||||||
custom-class="van-field"
|
custom-class="van-field"
|
||||||
size="{{ size }}"
|
|
||||||
>
|
>
|
||||||
<slot name="left-icon" slot="icon" />
|
<slot name="left-icon" slot="icon" />
|
||||||
<slot name="label" slot="title" />
|
<slot name="label" slot="title" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user