Commit f9748239 by 前端

表格插槽增加下标参数

1 parent a95968a7
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<el-table-column v-if="hasNum" align="left" width="74" label="序号" class-name="select-index" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column> <el-table-column v-if="hasNum" align="left" width="74" label="序号" class-name="select-index" type="index" :index="index => index + (page[this.pageConf.pageNum] - 1) * page[this.pageConf.pageSize] + 1"></el-table-column>
<el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}"> <el-table-column v-for="(item, index) in tableColumns" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'left'" :sortable="item.sortable" :render-header="item.renderHeader" v-bind="item.columnattrs ? item.columnattrs : {}" v-on="item.columnlisteners ? item.columnlisteners : {}">
<template slot-scope="scope"> <template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot> <slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width" :index="scope.$index"></slot>
<template v-else-if="item.formatter"> <template v-else-if="item.formatter">
<el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)"> <el-popover v-if="scope.row[item.prop] && scope.row[item.prop].length >= Math.ceil((item.width - 36) / 14) * item.line" placement="top" popper-class="base-popper" trigger="hover" :content="item.formatter(scope.row)">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }"> <span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!