console
new Vue({
el: '#app',
data: {
options: [{
value: '选项1',
label: '黄金糕'
}, {
value: '选项2',
label: '双皮奶'
}, {
value: '选项3',
label: '蚵仔煎'
}, {
value: '选项4',
label: '龙须面'
}, {
value: '选项5',
label: '北京烤鸭'
}],
value: ''
}
})
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Element UI 2.13.2 ui-select 可搜索</title>
<script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js">
</script>
<link rel="stylesheet" href="https://cdn.staticfile.org/element-ui/2.13.2/theme-chalk/index.css" />
<script src="https://cdn.staticfile.org/element-ui/2.13.2/index.js">
</script>
</head>
<body>
<div id="app">
<el-select v-model="value" filterable placeholder="请选择">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
<p>{{ value }}</p>
</div>
</body>
</html>