|
|
@@ -7,7 +7,7 @@
|
|
|
<div v-loading="state.exportLoading" class="table-footer-tool">
|
|
|
<SvgIcon v-if="!config.hideRefresh" name="iconfont icon-shuaxin" :size="22" title="刷新" @click="onRefreshTable" />
|
|
|
<el-tooltip effect="light" :content="state.switchFixedContent" placement="bottom-start" :show-after="200" v-if="state.haveFixed">
|
|
|
- <el-icon :style="{ color: state.fixedIconColor }" @click="switchFixed"><ele-Switch /></el-icon>
|
|
|
+ <el-icon :style="{color: state.fixedIconColor}" @click="switchFixed"><ele-Switch /></el-icon>
|
|
|
</el-tooltip>
|
|
|
<el-dropdown v-if="!config.hideExport" trigger="click">
|
|
|
<SvgIcon name="iconfont icon-yunxiazai_o" :size="22" title="导出" />
|
|
|
@@ -34,7 +34,7 @@
|
|
|
</div>
|
|
|
<el-scrollbar>
|
|
|
<div ref="toolSetRef" class="tool-sortable">
|
|
|
- <div class="tool-sortable-item" v-for="v in columns" :key="v.prop" v-show="!v.hideCheck && !v.fixed" :data-key="v.prop">
|
|
|
+ <div class="tool-sortable-item" v-for="v in columns" :key="v.prop" v-show="!v.hideCheck" :data-key="v.prop">
|
|
|
<i class="fa fa-arrows-alt handle cursor-pointer"></i>
|
|
|
<el-checkbox v-model="v.isCheck" size="default" class="ml12 mr8" :label="v.label" @change="onCheckChange" />
|
|
|
</div>
|
|
|
@@ -71,7 +71,6 @@
|
|
|
</template>
|
|
|
<template v-else-if="!item.children" v-slot="scope">
|
|
|
<formatter v-if="item.formatter" :fn="item.formatter(scope.row, scope.column, scope.cellValue, scope.index)"> </formatter>
|
|
|
- <!-- <span v-if="item.formatter">{{ item.formatter(scope.row,scope.column,scope.cellValue,scope.index) }}</span> -->
|
|
|
<template v-else-if="item.type === 'image'">
|
|
|
<el-image
|
|
|
:style="{ width: `${item.width}px`, height: `${item.height}px` }"
|
|
|
@@ -90,12 +89,10 @@
|
|
|
<!-- 自定义列插槽,插槽名为columns属性的prop -->
|
|
|
<template #default="scope" v-if="$slots[childrenItem.prop]">
|
|
|
<formatter v-if="childrenItem.formatter" :fn="childrenItem.formatter(scope.row, scope.column, scope.cellValue, scope.index)"> </formatter>
|
|
|
- <!-- <span v-if="childrenItem.formatter">{{ childrenItem.formatter(scope.row,scope.column,scope.cellValue,scope.index) }}</span> -->
|
|
|
<slot v-else :name="childrenItem.prop" v-bind="scope"></slot>
|
|
|
</template>
|
|
|
<template v-else v-slot="scope">
|
|
|
<formatter v-if="childrenItem.formatter" :fn="childrenItem.formatter(scope.row, scope.column, scope.cellValue, scope.index)"> </formatter>
|
|
|
- <!-- <span v-if="childrenItem.formatter">{{ childrenItem.formatter(scope.row,scope.column,scope.cellValue,scope.index) }}</span> -->
|
|
|
<template v-else-if="childrenItem.type === 'image'">
|
|
|
<el-image
|
|
|
:style="{ width: `${childrenItem.width}px`, height: `${childrenItem.height}px` }"
|
|
|
@@ -431,7 +428,7 @@ const setTableData = (data: Array<EmptyObjectType>, add: boolean = false) => {
|
|
|
|
|
|
const clearFixed = () => {
|
|
|
for (let item of state.columns) {
|
|
|
- delete item['fixed'];
|
|
|
+ delete item['fixed']
|
|
|
}
|
|
|
};
|
|
|
|