From 1fd157e9f4862c817c09cb35a05646b626fdcd93 Mon Sep 17 00:00:00 2001 From: neverland Date: Tue, 12 Dec 2017 20:00:19 +0800 Subject: [PATCH] [Improvement] Search: support native input attrs (#418) --- docs/markdown/en-US/field.md | 2 +- docs/markdown/en-US/search.md | 1 + docs/markdown/zh-CN/field.md | 2 +- docs/markdown/zh-CN/search.md | 2 +- packages/search/index.vue | 5 ++--- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/markdown/en-US/field.md b/docs/markdown/en-US/field.md index 1e22c6bc1..5a48f3c89 100644 --- a/docs/markdown/en-US/field.md +++ b/docs/markdown/en-US/field.md @@ -77,7 +77,7 @@ Textarea Filed can be auto resize when has `autosize` prop ``` ### API -Filed support all native properties of input tag,such as `maxlength`、`placeholder`、`readonly` +Filed support all native properties of input tag,such as `maxlength`、`placeholder`、`readonly`、`autofocus` | Attribute | Description | Type | Default | Accepted Values | |-----------|-----------|-----------|-------------|-------------| diff --git a/docs/markdown/en-US/search.md b/docs/markdown/en-US/search.md index a3d420ea8..36bcd56b4 100644 --- a/docs/markdown/en-US/search.md +++ b/docs/markdown/en-US/search.md @@ -55,6 +55,7 @@ Use `action` slot to custom right button, `cancel` event will no longer be trigg ``` ### API +Search support all native properties of input tag,such as `maxlength`、`placeholder`、`readonly`、`autofocus` | Attribute | Description | Type | Default | Accepted Values | |-----------|-----------|-----------|-------------|-------------| diff --git a/docs/markdown/zh-CN/field.md b/docs/markdown/zh-CN/field.md index 0a04f341a..657ea81bb 100644 --- a/docs/markdown/zh-CN/field.md +++ b/docs/markdown/zh-CN/field.md @@ -79,7 +79,7 @@ Vue.use(Field); ``` ### API -Filed 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`readonly` 等 +Filed 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`readonly`、`autofocus` 等 | 参数 | 说明 | 类型 | 默认值 | 可选值 | |-----------|-----------|-----------|-------------|-------------| diff --git a/docs/markdown/zh-CN/search.md b/docs/markdown/zh-CN/search.md index e30bf7f29..ec9345b34 100644 --- a/docs/markdown/zh-CN/search.md +++ b/docs/markdown/zh-CN/search.md @@ -46,10 +46,10 @@ Tips: 在 `van-search` 外层增加 form 标签,并且 action 不为空,即 ``` ### API +Search 默认支持 Input 标签所有的原生属性,比如 `maxlength`、`placeholder`、`readony`、`autofocus` 等 | 参数 | 说明 | 类型 | 默认值 | 可选值 | |-----------|-----------|-----------|-------------|-------------| -| placeholder | `input`的`placeholder`文案 | `String` | - | - | | background | 搜索框背景色 | `String` | `#f2f2f2` | 所有浏览器支持的颜色描述 | | showAction | 是否在搜索框右侧显示取消按钮 | `Boolean` | false | - | diff --git a/packages/search/index.vue b/packages/search/index.vue index b1b22c891..5b4a8b380 100644 --- a/packages/search/index.vue +++ b/packages/search/index.vue @@ -8,14 +8,14 @@ - +
@@ -35,7 +35,6 @@ export default create({ props: { value: String, showAction: Boolean, - placeholder: String, background: { type: String, default: '#f2f2f2'