SelMune.vue 1.74 KB
Newer Older
WH committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
<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;
WF1020 committed
49 50 51 52 53 54 55 56 57 58
            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],
                  });
              }
WH committed
59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
            }
            return arr;
        },
    },
};
</script>

<style>
a {
    text-decoration-line: none;
    color: #606266;
}
a:hover {
    color: blue;
}
</style>