From 854a91c3849e36bcd1ed08219e3a47fe78526bbd Mon Sep 17 00:00:00 2001 From: neverland Date: Thu, 8 Aug 2019 20:56:47 +0800 Subject: [PATCH] [Doc] Field: update props document (#4074) --- src/field/README.md | 6 ++++-- src/field/README.zh-CN.md | 8 ++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/field/README.md b/src/field/README.md index 888ad6860..4dcf095e1 100644 --- a/src/field/README.md +++ b/src/field/README.md @@ -125,8 +125,10 @@ Field support all native properties of input tag,such as `maxlength`、`placeh |------|------|------|------| | value | Field value | `string | number` | - | | label | Field label | `string` | - | -| type | Input type | `string` | `text` | +| type | Input type, can be set to `tel` `number`
`textarea` `password` | `string` | `text` | | size | Size,can be set to `large` | `string` | - | +| maxlength | Max length of value | `string | number` | - | +| placeholder | Placeholder | `string` | - | | border | Whether to show inner border | `boolean` | `true` | | disabled | Whether to disable field | `boolean` | `false` | | readonly | Whether to be readonly | `boolean` | `false` | @@ -134,8 +136,8 @@ Field support all native properties of input tag,such as `maxlength`、`placeh | clearable | Whether to be clearable | `boolean` | `false` | | clickable | Whether to show click feedback when clicked | `boolean` | `false` | | is-link | Whether to show link icon | `boolean` | `false` | -| arrow-direction | Can be set to `left` `up` `down` | `string` | - | | error | Whether to show error info | `boolean` | `false` | +| arrow-direction | Can be set to `left` `up` `down` | `string` | - | | error-message | Error message | `string` | `''` | | label-class | Label className | `any` | - | | label-width | Label width | `string | number` | `90px` | diff --git a/src/field/README.zh-CN.md b/src/field/README.zh-CN.md index 788953355..5a78ef477 100644 --- a/src/field/README.zh-CN.md +++ b/src/field/README.zh-CN.md @@ -122,14 +122,14 @@ Vue.use(Field); ### Props -Field 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`autofocus` 等 - | 参数 | 说明 | 类型 | 默认值 | 版本 | |------|------|------|------|------|------| | label | 输入框左侧文本 | `string` | - | - | | value | 当前输入的值 | `string | number` | - | - | -| type | 可设置为原生类型, 如 `number` `tel` `textarea` | `string` | `text` | - | +| type | 输入框类型, 可选值为 `tel` `number`
`textarea` `password` 等 | `string` | `text` | - | | size | 大小,可选值为 `large` | `string` | - | 1.6.9 | +| maxlength | 输入的最大字符数 | `string | number` | - | - | +| placeholder | 占位提示文字 | `string` | - | - | | border | 是否显示内边框 | `boolean` | `true` | - | | disabled | 是否禁用输入框 | `boolean` | `false` | - | | readonly | 是否只读 | `boolean` | `false` | - | @@ -137,8 +137,8 @@ Field 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`pla | clearable | 是否启用清除控件 | `boolean` | `false` | - | | clickable | 是否开启点击反馈 | `boolean` | `false` | 2.0.0 | | is-link | 是否展示右侧箭头并开启点击反馈 | `boolean` | `false` | - | -| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `string` | - | 2.0.4 | | error | 是否将输入内容标红 | `boolean` | `false` | - | +| arrow-direction | 箭头方向,可选值为 `left` `up` `down` | `string` | - | 2.0.4 | | error-message | 底部错误提示文案,为空时不展示 | `string` | `''` | - | label-class | 左侧文本额外类名 | `any` | - | 2.0.0 | | label-width | 左侧文本宽度,可指定单位,默认为 px | `string | number` | `90px` | 1.6.17 |