Commit b012123a authored by 何虹's avatar 何虹 💬

优化升级表格

parent ea0c7db5
This diff is collapsed.
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
@clickLabel='clickToolLabel' @clickLabel='clickToolLabel'
></tool-column> ></tool-column>
</span> </span>
<u-table <ux-grid
:data-changes-scroll-top='false' :data-changes-scroll-top='false'
:big-data-checkbox="true" :big-data-checkbox="true"
ref="plTable" ref="plTable"
...@@ -50,29 +50,31 @@ ...@@ -50,29 +50,31 @@
<template v-for='(column,index) in tableColumns'> <template v-for='(column,index) in tableColumns'>
<template v-if="!column.childs"> <template v-if="!column.childs">
<u-table-column <ux-table-column
v-if='tableConfig.expandChild' v-if='column.showType==="expandChild"'
:key="index" :key="index"
type="expand" type="expand"
width='50px'
title='展开'
> >
<template slot-scope="props"> <template v-slot:content="{ row }">
<rowTable :rowTable='props.row._childTable'></rowTable> <rowTable :rowTable='row._childTable'></rowTable>
</template> </template>
</u-table-column> </ux-table-column>
<u-table-column <ux-table-column
v-else-if="column.showType==='index'" v-else-if="column.showType==='index'"
:key="index" :key="index"
type="index" type="index"
width="55" width="55"
/> />
<u-table-column <ux-table-column
v-else-if="column.showType==='selection'" v-else-if="column.showType==='selection'"
:key="index" :key="index"
type="selection" type="checkbox"
width="55" width="55"
:selectable="selectable" :selectable="selectable"
/> />
<u-table-column <ux-table-column
v-else-if='column.showType==="handleColumn"' v-else-if='column.showType==="handleColumn"'
:key="index" :key="index"
fixed="right" fixed="right"
...@@ -88,14 +90,14 @@ ...@@ -88,14 +90,14 @@
@itemClickHandle='itemClickHandle' @itemClickHandle='itemClickHandle'
/> />
</template> </template>
</u-table-column> </ux-table-column>
<u-table-column <ux-table-column
v-else v-else
:key="index" :key="index"
:resizable="column.resizable" :resizable="column.resizable"
:show-overflow-tooltip="column.showOverflow" :show-overflow-tooltip="column.showOverflow"
:prop="column.prop" :field="column.prop"
:label="column.label" :title="column.label"
:fixed="column.fixed" :fixed="column.fixed"
:min-width="column.width||80" :min-width="column.width||80"
:sortable="column.isSort?'custom':false" :sortable="column.isSort?'custom':false"
...@@ -116,17 +118,17 @@ ...@@ -116,17 +118,17 @@
> >
</childItem> </childItem>
</template> </template>
</u-table-column> </ux-table-column>
</template> </template>
<template v-else-if='column.childs'> <template v-else-if='column.childs'>
<u-table-column <ux-table-column
:label="column.label" :label="column.label"
:key="index" :key="index"
> >
<template v-for="item in column.childs"> <template v-for="item in column.childs">
<u-table-column <ux-table-column
:prop="item.prop" :field="item.prop"
:label="item.label" :title="item.label"
:key="item.label" :key="item.label"
:min-width="column.width||80" :min-width="column.width||80"
> >
...@@ -140,13 +142,13 @@ ...@@ -140,13 +142,13 @@
> >
</childItem> </childItem>
</template> </template>
</u-table-column> </ux-table-column>
</template> </template>
</u-table-column> </ux-table-column>
</template> </template>
</template> </template>
</u-table> </ux-grid>
<tbaleColumsSet <tbaleColumsSet
v-model="dialogVisibleTbaleColums" v-model="dialogVisibleTbaleColums"
:tableDataColums='tableDataColums' :tableDataColums='tableDataColums'
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
<el-table <el-table
class="innerTable" class="innerTable"
:data="tableData" :data="tableData"
border
> >
<el-table-column v-for="item in tableColumn" :key="item" <el-table-column v-for="item in tableColumn" :key="item"
:prop="item" :prop="item"
...@@ -34,7 +35,7 @@ export default { ...@@ -34,7 +35,7 @@ export default {
const row = Object.keys(this.tableData[0]) const row = Object.keys(this.tableData[0])
return row return row
} else { } else {
return [] return {}
} }
} }
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment