<template> <!-- <el-table--> <!-- :data="tableData"--> <!-- border--> <!-- stripe--> <!-- :show-header="false"--> <!-- :cell-style="cellSttyle"--> <!-- >--> <el-table :data="tableData" border stripe :show-header="false" :cell-style="cellSttyle" > <el-table-column prop="label" align="center"> <template slot-scope="scope"> <c-button @click="onNarBtnClick(scope.row.url, scope.row.label)" :label="scope.row.label" :disabled="scope.row.disabled" >{{ scope.row.label }} </c-button> </template> </el-table-column> </el-table> </template> <script> import event from "../event" export default { inject: ["root"], props: ["data", "model"], mixins: [event], // 里面包含了Default、Check等的公共处理 data() { return { cellSttyle: { height: "25px" }, meumItem: [], }; }, methods: { }, computed: { tableData() { const arr = []; var data = this.data; if (data && data.length) { for (let i = 0; i < data.length; i++) { const items = data[i].split("\t"); arr.push({ url: items[0], label: items[1], disabled: items[2] == "N" ? true : false, other: items[3], }); } } return arr; }, }, }; </script> <style> a { text-decoration-line: none; color: #606266; } a:hover { color: blue; } </style>