el-table slot-scope error
by japhfortin
HTML
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui/lib/index.js"></script>
<div id="app">
<el-table :data=list>
<el-table-column label="First Name">
<template slot-scope="scope">{{ scope.row.first_name }}</template>
</el-table-column>
<el-table-column prop="last_name" label="Last Name">
</el-table-column>
</el-table>
</div>
CSS
@import url("//unpkg.com/element-ui/lib/theme-chalk/index.css");
JavaScript
var Main = {
data() {
return {
input: '',
list: [
{
first_name: 'Japheth',
last_name: 'Fortin'
}
]
}
},
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')