2018-03-20 11:06:04 +00:00
|
|
|
<cn>
|
|
|
|
#### 搜索框
|
|
|
|
带有搜索按钮的输入框。
|
|
|
|
</cn>
|
|
|
|
|
|
|
|
<us>
|
|
|
|
#### Search box
|
|
|
|
Example of creating a search box by grouping a standard input with a search button.
|
|
|
|
</us>
|
|
|
|
|
2019-10-09 10:32:23 +00:00
|
|
|
```tpl
|
2017-12-07 04:31:12 +00:00
|
|
|
<template>
|
2018-04-07 06:29:59 +00:00
|
|
|
<div>
|
2019-09-28 12:45:07 +00:00
|
|
|
<a-input-search placeholder="input search text" style="width: 200px" @search="onSearch" />
|
|
|
|
<br /><br />
|
|
|
|
<a-input-search placeholder="input search text" @search="onSearch" enterButton />
|
2018-04-07 06:29:59 +00:00
|
|
|
<br /><br />
|
|
|
|
<a-input-search
|
|
|
|
placeholder="input search text"
|
|
|
|
@search="onSearch"
|
2019-09-28 12:45:07 +00:00
|
|
|
enterButton="Search"
|
|
|
|
size="large"
|
2018-04-07 06:29:59 +00:00
|
|
|
/>
|
|
|
|
<br /><br />
|
|
|
|
<a-input-search placeholder="input search text" @search="onSearch" size="large">
|
|
|
|
<a-button slot="enterButton">Custom</a-button>
|
|
|
|
</a-input-search>
|
|
|
|
</div>
|
2017-12-07 04:31:12 +00:00
|
|
|
</template>
|
|
|
|
|
2018-03-20 11:06:04 +00:00
|
|
|
<script>
|
2019-09-28 12:45:07 +00:00
|
|
|
export default {
|
|
|
|
methods: {
|
|
|
|
onSearch(value) {
|
|
|
|
console.log(value);
|
|
|
|
},
|
2017-12-07 04:31:12 +00:00
|
|
|
},
|
2019-09-28 12:45:07 +00:00
|
|
|
};
|
2017-12-07 04:31:12 +00:00
|
|
|
</script>
|
2018-03-20 11:06:04 +00:00
|
|
|
```
|