Authored by 王涛

Merge branch 'master-500-dev-lushangqing' into 'master-500-dev'

【无】表格组件更改为可以多级表头



See merge request !880
... ... @@ -23,7 +23,7 @@
:sortable="item.sortable == undefined ? false : item.sortable"
:width="getWidth(item.width)"
v-for="item in columns">
<template #default="scope">
<template v-if="!item.columns || item.columns.lendth==0" #default="scope">
<slot :column="item" :prop="item.prop" :row="scope.row">
<div v-if="typeof(item.click) == 'function' && typeof(item.render) == 'function'">
<span @click="item.click(scope.row)" style="cursor: pointer"
... ... @@ -49,6 +49,37 @@
</span>
</slot>
</template>
<el-table-column v-else :align="columnItem.align == undefined ? 'center' : columnItem.align " :label="columnItem.label" :prop="columnItem.prop"
:sortable="columnItem.sortable == undefined ? false : columnItem.sortable"
:width="getWidth(columnItem.width)"
v-for="columnItem in item.columns">
<template #default="scope">
<slot :column="columnItem" :prop="columnItem.prop" :row="scope.row">
<div v-if="typeof(columnItem.click) == 'function' && typeof(columnItem.render) == 'function'">
<span @click="columnItem.click(scope.row)" style="cursor: pointer"
v-html="columnItem.render(scope.row)"></span>
</div>
<div v-else-if="typeof(columnItem.click) == 'function'">
<span @click="columnItem.click(scope.row)" style="cursor: pointer"> {{scope.row[columnItem.prop]}}</span>
</div>
<div v-else-if="typeof(columnItem.render) == 'function'">
<span v-html="columnItem.render(scope.row)">{{scope.row[columnItem.prop]}}</span>
</div>
<span v-else>
<el-tooltip placement="top">
<template #content>
<div v-html="getTextContent(scope.row[columnItem.prop])">
</div>
</template>
<div style="overflow: hidden; text-overflow: ellipsis;display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;">
{{scope.row[columnItem.prop]}}
</div>
</el-tooltip>
</span>
</slot>
</template>
</el-table-column>
</el-table-column>
<el-table-column align="center" label="操作" v-if="showTools && columns.length > 0" width="80">
... ...