|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
<el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" border>
|
|
<el-table :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" border>
|
|
- <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width">
|
|
|
|
|
|
+ <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width" :fixed="col.columnname === fixedName?'right':false">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<!-- 自定义表格显示内容 -->
|
|
<!-- 自定义表格显示内容 -->
|
|
<slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
|
|
<slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
|
|
@@ -24,7 +24,7 @@ export default {
|
|
custom:是否启用自定义结构;
|
|
custom:是否启用自定义结构;
|
|
opwidth:操作列宽度
|
|
opwidth:操作列宽度
|
|
*/
|
|
*/
|
|
- props:['layout','data','custom','height'],
|
|
|
|
|
|
+ props:['layout','data','custom','height','fixedName'],
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
list:[],
|
|
list:[],
|
|
@@ -49,5 +49,6 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
</script>
|
|
</script>
|
|
-<style>
|
|
|
|
|
|
+<style scoped>
|
|
|
|
+
|
|
</style>
|
|
</style>
|