<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Vue 小白- 学习教程</title>
<script src="https://cdn.staticfile.org/vue/2.2.2/vue.min.js"></script>
</head>
<body>
<div id="app">
<Select v-model="projectId" placeholder="编辑我……" >
<Option
v-for="(item,index) in this.productInfo"
:value="item.id"
:key="index"
>{{ item.name }}</Option>
</Select>
</div>
<script>
new Vue({
el: '#app',
data() {
return {
projectId :"",
productInfo: [
{
createTime: "2019-01-07",
enabled: "Y",
id: 1,
name: "吴旭鹏",
updateTime: "2019-12-23",
},
{
createTime: "2019-01-07",
enabled: "Y",
id: 1,
name: "吴许有",
updateTime: "2019-12-23",
},
]
}
}
})
</script>
</body>
</html>
vue下拉框使用法则
最新推荐文章于 2025-02-08 11:06:23 发布