mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-27 05:00:48 +08:00
35 lines
710 B
Markdown
35 lines
710 B
Markdown
|
# Size
|
||
|
```html
|
||
|
<n-auto-complete :options="options" v-model="value" placeholder="Email" size="small" />
|
||
|
<n-auto-complete :options="options" v-model="value" placeholder="Email" size="medium" />
|
||
|
<n-auto-complete :options="options" v-model="value" placeholder="Email" size="large" />
|
||
|
```
|
||
|
```js
|
||
|
export default {
|
||
|
computed: {
|
||
|
options () {
|
||
|
return [
|
||
|
'@gmail.com',
|
||
|
'@163.com',
|
||
|
'@qq.com'
|
||
|
].map(suffix => {
|
||
|
const prefix = this.value.split('@')[0]
|
||
|
return {
|
||
|
label: prefix + suffix,
|
||
|
value: prefix + suffix,
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
data () {
|
||
|
return {
|
||
|
value: ''
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
```
|
||
|
```css
|
||
|
.n-auto-complete {
|
||
|
margin-bottom: 8px;
|
||
|
}
|
||
|
```
|