From 34c1217084d7290f54d764d335857af0ae365ba5 Mon Sep 17 00:00:00 2001 From: ludc Date: 星期三, 02 八月 2023 14:57:14 +0800 Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs --- Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue index 1bec8e9..21d4327 100644 --- a/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue +++ b/Source/UBCS-WEB/src/components/MasterCrud/VciMasterCrud.vue @@ -31,7 +31,7 @@ :label="item.label" :prop="item.prop" :show-overflow-tooltip="true" :sortable="item.sortable" - :width="item.label.length >= 4 ? '150' : item.label.length == 3 ? '120' : '90'" + :width="item.width" align="center"> </el-table-column> </el-table> @@ -241,13 +241,12 @@ created() { }, mounted() { - }, activated() { - // this.doLayout(); - this.$nextTick(() => { - this.$refs.dataTable.doLayout() - }) + this.doLayout() + }, + updated() { + this.doLayout() }, watch: { tableHeadDataFateher: { @@ -266,6 +265,7 @@ handler(newval, oldval) { this.tableData = newval; this.searchResults = newval + this.doLayout() }, }, tableHeadFindData: { @@ -643,10 +643,13 @@ saveRow() { this.editingRow = null; }, + //琛ㄦ牸閿欒闂 doLayout() { this.$nextTick(() => { - this.$refs.crud.doLayout(); - }); + if (this.$refs.dataTable && this.$refs.dataTable.doLayout) { + this.$refs.dataTable.doLayout(); + } + }) }, //琛ㄦ牸澶存覆鏌� CrudHeaderRend() { @@ -717,6 +720,7 @@ limit: this.page.pageSize, }).then((res) => { this.tableData = res.data.data; + this.doLayout() }); }, //澶氶�� -- Gitblit v1.9.3