CN-956: 管理下的操作日志模块,自定义列功能异常

This commit is contained in:
刘洪洪
2023-04-19 16:25:55 +08:00
parent a7b8b82479
commit 0d43e2141f
12 changed files with 31 additions and 27 deletions

View File

@@ -16,8 +16,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -18,8 +18,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -16,8 +16,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -18,8 +18,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -16,8 +16,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -17,8 +17,8 @@
width="55">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -96,8 +96,8 @@
width="30">
</el-table-column>
<el-table-column
v-for="(item, index) in customTableTitles"
:key="`col-${index}`"
v-for="item in customTableTitles"
:key="item.prop"
:fixed="item.fixed"
:label="item.label"
:min-width="`${item.minWidth}`"

View File

@@ -81,8 +81,12 @@ export default {
// 有排序的额外添加24px的排序图标宽度
if (item.sortable) {
if (!item.initFlag) {
item.minWidth = item.minWidth + 32
}
// 避免customize多次点击save生成表格导致width越来越大保证初始化一次就确定宽度
item.initFlag = true
}
if (item.minWidth < newWidth) {
item.minWidth = newWidth

View File

@@ -25,9 +25,9 @@
</el-table-column>
<el-table-column
v-for="(c, i) in table.tableColumns"
v-for="c in table.tableColumns"
show-overflow-tooltip
:key="i"
:key="c"
:label="c"
:prop="c"
>

View File

@@ -11,8 +11,8 @@
:size="'mini'"
:height="'100%'">
<el-table-column
v-for="(item,index) in tableKey"
:key="index"
v-for="item in tableKey"
:key="item.prop"
:label="item.label"
:prop="item.prop"
:min-width="item.width"

View File

@@ -9,17 +9,17 @@
<el-table-column :width="60" v-if="table.currentPageData.length" type="index" label="#">
</el-table-column>
<el-table-column
v-for="(c, i) in table.tableColumns.common"
v-for="c in table.tableColumns.common"
show-overflow-tooltip
:key="i"
:key="c"
:label="$t(chartTableColumnMapping[c] || c)"
:prop="c"
>
</el-table-column>
<el-table-column
v-for="(c, i) in table.tableColumns.order"
v-for="c in table.tableColumns.order"
show-overflow-tooltip
:key="i"
:key="c"
:label="$t(chartTableColumnMapping[c] || c)"
:prop="c"
>

View File

@@ -27,8 +27,8 @@
width="48">
</el-table-column>
<el-table-column
v-for="(item, index) in tableTitlesOther"
:key="index"
v-for="item in tableTitlesOther"
:key="item.prop"
show-overflow-tooltip
:min-width="item.width"
:label="item.label"
@@ -55,8 +55,8 @@
</template>
</el-table-column>
<el-table-column
v-for="(item, index) in tableTitles"
:key="index"
v-for="item in tableTitles"
:key="item.prop"
show-overflow-tooltip
:min-width="item.width"
:label="(tableNameColumn === 'appName'&& item.prop === 'tableNameColumn')? $t('overall.appName'):item.label"