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

优化升级表格

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