mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2024-12-21 04:50:14 +08:00
534 B
534 B
成组
<n-auto-complete :options="options" v-model="value" placeholder="邮箱" />
export default {
computed: {
options () {
return [
['谷歌', '@gmail.com'],
['网易', '@163.com'],
['腾讯', '@qq.com']
].map(emailInfo => {
return {
type: 'group',
name: emailInfo[0],
children: [
this.value.split('@')[0] + emailInfo[1]
]
}
})
}
},
data () {
return {
value: ''
}
}
}