1
0
mirror of https://gitee.com/vant-contrib/vant-weapp.git synced 2025-04-06 03:58:05 +08:00

[improvement] Field: add placeholder-style prop ()

This commit is contained in:
neverland 2018-09-29 15:18:24 +08:00 committed by GitHub
parent 3e12b21b66
commit ee2aacf173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 17 additions and 15 deletions
packages

@ -164,15 +164,15 @@ Page({
### Checkbox Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
| bind:change | 当绑定值变化时触发的事件 | 当前组件的值 |
### CheckboxGroup Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| change | 当绑定值变化时触发的事件 | 当前组件的值 |
| bind:change | 当绑定值变化时触发的事件 | 当前组件的值 |
### Checkbox Slot

@ -149,6 +149,7 @@ Page({
| title-width | 标题宽度 | `String` | `90px` |
| maxlength | 最大输入长度,设置为 -1 的时候不限制最大长度 | `Number` | `-1` |
| placeholder | 输入框为空时占位符 | `String` | - |
| placeholder-style | 指定 placeholder 的样式 | `String` | - |
| is-link | 是否展示右侧箭头并开启点击反馈 | `Boolean` | `false` |
| error | 是否将输入内容标红 | `Boolean` | `false` |
| error-message | 底部错误提示文案,为空时不展示 | `String` | `''` |
@ -186,7 +187,6 @@ Page({
|-----------|-----------|
| input-class | 输入框样式类 |
| icon-class | 右侧图标样式类 |
| placeholder-class | 占位内容样式类 |
### 更新日志

@ -27,7 +27,7 @@ VantComponent({
customStyle: String,
useIconSlot: Boolean,
useButtonSlot: Boolean,
placeholderClass: String,
placeholderStyle: String,
cursorSpacing: {
type: Number,
value: 50

@ -19,9 +19,10 @@
disabled="{{ disabled }}"
readonly="{{ readonly }}"
maxlength="{{ maxlength }}"
placeholder="{{ placeholder }}"
auto-height="{{ autosize }}"
placeholder-class="{{ placeholderClass }} {{ error ? 'van-field--error' : '' }}"
placeholder="{{ placeholder }}"
placeholder-style="{{ placeholderStyle }} "
placeholder-class="{{ error ? 'van-field--error' : '' }}"
cursor-spacing="{{ cursorSpacing }}"
bindinput="onInput"
bind:blur="onBlur"
@ -38,7 +39,8 @@
readonly="{{ readonly }}"
maxlength="{{ maxlength }}"
placeholder="{{ placeholder }}"
placeholder-class="{{ placeholderClass }} {{ error ? 'van-field--error' : '' }}"
placeholder-style="{{ placeholderStyle }} "
placeholder-class="{{ error ? 'van-field--error' : '' }}"
confirm-type="{{ confirmType }}"
cursor-spacing="{{ cursorSpacing }}"
bindinput="onInput"

@ -59,9 +59,9 @@
### Radio Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| change | 当绑定值变化时触发的事件 | 当前选中项的 name |
| bind:change | 当绑定值变化时触发的事件 | 当前选中项的 name |
### Radio 外部样式类
@ -80,9 +80,9 @@
### RadioGroup Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| change | 当绑定值变化时触发的事件 | 当前选中项的 name |
| bind:change | 当绑定值变化时触发的事件 | 当前选中项的 name |
### RadioGroup 外部样式类

@ -55,7 +55,7 @@
### Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| bind:change | 当绑定值变化时触发的事件 | event.detail: 当前输入的值 |
| bind:overlimit | 点击不可用的按钮时触发 | - |

@ -51,7 +51,7 @@ Page({
### Event
| 事件名 | 说明 | 回调参数 |
| 事件名 | 说明 | 回调参数 |
|-----------|-----------|-----------|
| bind:click-nav | 左侧导航点击时,触发的事件 | event.detail.index被点击的导航的索引 |
| bind:click-item | 右侧选择项被点击时,会触发的事件 | event.detail: 该点击项的数据 |