JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//unpkg.com/vue/dist/vue.js"></script>
<script src="//unpkg.com/element-ui@1.3.3/lib/index.js"></script>
<div id="app">
<template>
<el-table :data="tableData4" border style="width: 301px" max-height="250">
<el-table-column prop="date" label="日期" width="100">
</el-table-column>
<el-table-column prop="name" label="姓名" width="100">
</el-table-column>
<el-table-column fixed="right" label="操作" width="100">
<template scope="scope">
<el-button type="text" size="small">
移除
</el-button>
</template>
</el-table-column>
</el-table>
</template>
</div>
SCSS
@import url("//unpkg.com/element-ui@1.3.3/lib/theme-default/index.css");
Babel + JSX
var Main = {
methods: {
deleteRow(index, rows) {
rows.splice(index, 1);
}
},
computed:{
tableData4(){
let data = {
date: '2016-05-03',
name: '王小虎',
province: '上海',
city: '普陀区',
address: '上海市普陀区金沙江路 1518 弄',
zip: 200333
}
let res = []
for(let i=0; i<90; i++){
res.push(data)
}
return res
}
}
}
var Ctor = Vue.extend(Main)
new Ctor().$mount('#app')