JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui/lib/index.js"></script>
<div id="app">
<template>
<el-select v-model="objectValue" :value-key="id">
<el-option v-for="item in items" :label="item.id" :value="item"></el-option>
</el-select>
</template>
</div>
SCSS
@import url("//unpkg.com/element-ui/lib/theme-default/index.css");
Babel + JSX
let items =[
{
id : "a",
attr1 : 0,
attr2 : 1
},
{
id : "b",
attr1 : 1,
attr2 : 2
}
]
var Main = {
data() {
return {
objectValue : items[0],
items : items
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')