姓名: {{ scope.row.name }}
{{ scope.row.name }}
{{ scope.row.take }}
{{ scope.row.startTime }}
{{ scope.row.finishTime }}
編輯
删除
new Vue({
el:'#app',
data:{
tableData: [],
getUrl: 'http://localhost:8080/mytime/getTodayTomatos',
},
created: function(){
this.getTableData()
},
methods:{
getTableData:function(){
var self = this;
$.ajax({
type : "post",
dataType : "json",
contentType : "application/json",
url : "http://localhost:8080/mytime/getTodayTomatos",
success : function(json) {
self.tableData=json.fitomatos;
},
error : function(json) {
alert("加載失敗");
}
});
},
handleEdit(index, row) {
console.log(index, row.name);
},
handleDelete(index, row) {
console.log(index, row);
}
}
})
效果圖:

以上這篇vue+element-ui+ajax實作一個表格的執行個體就是小編分享給大家的全部内容了,希望能給大家一個參考,也希望大家多多支援腳本之家。
您可能感興趣的文章: