Commit 986a6c1c by luyt

fix:GlTableButton条件筛选点击更多,多出margin20问题

1 parent ee89cd54
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
......@@ -202,7 +202,7 @@ export default {
.operate {
text-align: left;
width: 190px;
margin-bottom: 20px;
// margin-bottom: 20px;
.expand {
font-size: 14px;
}
......
......@@ -54,6 +54,7 @@
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
<el-table-column v-if="tableParams.tableOption" label="操作" :align="tableParams.tableOption.align || 'left'" :width="tableParams.tableOption.width || '200'" fixed="right">
<template slot-scope="scope">
......@@ -76,14 +77,14 @@
<script>
import noDataImgUrl from '@/assets/empty.png'
import SubElTableColumn from './sub-el-table-column.vue'
import GlSubTableColumn from '../../GlSubTableColumn'
import GlSubTable from '../../GlSubTable'
// import GlSubTableColumn from '../../GlSubTableColumn'
// import GlSubTable from '../../GlSubTable'
export default {
name: 'GLTable',
components: {
SubElTableColumn,
GlSubTableColumn,
GlSubTable
// GlSubTableColumn,
// GlSubTable
},
props: {
// `medium` / `small` / `mini`
......
<template>
<div class="sub-el-table-column">
<el-table-column v-for="(item, index) in reverseData" :key="index" :label="item.label" :prop="item.prop" :width="item.width" :min-width="item.minWidth" :fixed="item.fixed" :align="item.align || 'center'" :sortable="item.sortable" :render-header="item.renderHeader">
<template slot-scope="scope">
<slot v-if="item.addHtml" :name="item.addHtml" :scope="scope.row" :prop="item.prop" :width="item.width"></slot>
<template v-else-if="item.formatter">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="item.formatter(scope.row)" v-text="item.formatter(scope.row)"></span>
</template>
<template v-else-if="getListApi">
<span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="scope.row[item.prop]" v-text="scope.row[item.prop]"></span>
</template>
<!-- <template v-else-if="item.labelchildren">
<el-table-column v-for="(labelitem, labelindex) in tableColumns.labelchildren" :key="'labelindex'+labelindex">
<span>123456</span>
</el-table-column> -->
<!-- <span class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" :title="tableData[scope.$index][item.prop]" v-text="tableData[scope.$index][item.prop]"></span> -->
<!-- </template> -->
<template v-else>
<!-- 大于10或 20个字节长度 -->
<el-popover v-if="tableData[scope.$index][item.prop] && tableData[scope.$index][item.prop].length >= 10 * item.line" placement="top" title="标题" width="200" trigger="click" :content="tableData[scope.$index][item.prop]">
<span slot="reference" class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span>
</el-popover>
<span v-else class="line-ellipsis" :style="{ '-webkit-line-clamp': item.line ? item.line : '' }" v-text="tableData[scope.$index][item.prop]"></span>
</template>
<template v-if="item.addSymbol">
<span v-text="item.addSymbol"></span>
</template>
</template>
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children"></sub-el-table-column>
</el-table-column>
</div>
</template>
<script>
export default {
name: 'sub-el-table-column',
props: {
data: {
type: Array,
default: () => []
}
},
computed: {
reverseData() {
return [...this.data].reverse()
}
}
// created(){
// // console.log('data',this.data)
// }
}
</script>
<style lang="scss">
// .sub-el-table-column {
// }
</style>
\ No newline at end of file
......@@ -48,12 +48,14 @@
<!-- 递归 -->
<sub-el-table-column v-if="item.children" :data="item.children" :tableData="tableData" :getListApi="getListApi"></sub-el-table-column>
</el-table-column>
</div>
</div>
</template>
<script>
import GlSubTableColumn from '../../GlSubTableColumn'
// import GlSubTableColumn from '../../GlSubTableColumn'
export default {
name: 'sub-el-table-column',
props: {
......@@ -80,9 +82,9 @@ export default {
return arr
}
},
components: {
GlSubTableColumn
}
// components: {
// GlSubTableColumn
// }
// created(){
// // console.log('data',this.data)
// }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!