前端工作总结270-el-table使用

<template>
<el-dialog
title="修改记录"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose">
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
prop="name"
label="任务名称"
width="180">
</el-table-column>
<el-table-column
prop="username"
label="修改人">
</el-table-column>
<el-table-column
prop="start_time"
label="创建时间">
</el-table-column>
<el-table-column
prop="updated_at"
label="更新时间">
</el-table-column>
</el-table>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false">关闭</el-button>
</span>
</el-dialog>
</template>
<script>
export default {
name:"ResetList",
data() {
return {
tableData:[],
dialogVisible: false
};
},
methods: {
show(record){
this.tableData=record
console.log(record)
/* this.id=id*/
this.dialogVisible=true
/* getAction("/task",).then(res=>{
console.log(res)
let List=[]
res.data.items.map((value,index)=>{
/!* console.log(value.task_recode)*!/
List.push({...value.task_recode})
})
this.tableData=List
console.log(this.tableData)
})*/
},
handleClose(done) {
this.$confirm('确认关闭?')
.then(_ => {
done();
})
.catch(_ => {});
}
}
};
</script>

posted @   前端导师歌谣  阅读(37)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 25岁的心里话
· 闲置电脑爆改个人服务器(超详细) #公网映射 #Vmware虚拟网络编辑器
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· 零经验选手,Compose 一天开发一款小游戏!
· 一起来玩mcp_server_sqlite,让AI帮你做增删改查!!
点击右上角即可分享
微信分享提示