赞
踩
<el-table-column type="selection" width="55"></el-table-column> <el-table-column prop="id" label="ID" width="80"></el-table-column> <el-table-column prop="name" label="文件名称"></el-table-column> <el-table-column prop="type" label="文件类型"></el-table-column> <el-table-column prop="size" label="文件大小(kb)"></el-table-column> <el-table-column label="下载"> <template slot-scope="scope"> <el-button type="primary" @click="download(scope.row.url)">下载</el-button> </template> </el-table-column> <el-table-column label="启用"> <template slot-scope="scope"> <el-switch v-model="scope.row.enable" active-color="#13ce66" inactive-color="#ccc" @change="changeEnable(scope.row)"></el-switch> </template> </el-table-column> <el-table-column label="操作" width="200" align="center"> <template slot-scope="scope"> <el-popconfirm class="ml-5" confirm-button-text='确定' cancel-button-text='我再想想' icon="el-icon-info" icon-color="red" title="您确定删除吗?" @confirm="del(scope.row.id)" > <el-button type="danger" slot="reference">删除 <i class="el-icon-remove-outline"></i></el-button> </el-popconfirm> </template> </el-table-column> </el-table> --------------------------------------------------------------------------------- data() { return { tableData: [],}} --------------------------------------------------------------------------------- load() { this.request.get("/file/page", { params: { pageNum: this.pageNum, pageSize: this.pageSize, name: this.name, } }).then(res => { this.tableData = res.data.records this.total = res.data.total })
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。