|
|
|
@ -1,6 +1,30 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="gMainTable">
|
|
|
|
|
<el-table ref="gMainTable" :data="tableData"> </el-table>
|
|
|
|
|
<el-table ref="gMainTable" :data="tableData">
|
|
|
|
|
<template v-for="(item, index) in columns">
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-if="item.slot"
|
|
|
|
|
:key="item.prop + index"
|
|
|
|
|
:prop="item.prop"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
v-bind="item.attrs || {}"
|
|
|
|
|
>
|
|
|
|
|
<!-- slot内容 -->
|
|
|
|
|
<template v-slot="scope">
|
|
|
|
|
<slot :name="item.slot" :scope="scope" />
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
v-else
|
|
|
|
|
:key="item.prop + index"
|
|
|
|
|
:prop="item.prop"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
v-bind="item.attrs || {}"
|
|
|
|
|
>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</template>
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
<script>
|
|
|
|
|