From 4a72e607ab88174f2f6c4fb615083d88a60a7179 Mon Sep 17 00:00:00 2001 From: zxy Date: Tue, 21 Apr 2026 11:52:30 +0800 Subject: [PATCH] =?UTF-8?q?fix(table):=20=E4=BF=AE=E5=A4=8D=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E5=B0=BA=E5=AF=B8=E8=B0=83=E6=95=B4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/example/tsoorder/index.vue | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/jnpf-java-boot/jnpf-web/src/views/example/tsoorder/index.vue b/jnpf-java-boot/jnpf-web/src/views/example/tsoorder/index.vue index d7f6b78..15cf9ea 100644 --- a/jnpf-java-boot/jnpf-web/src/views/example/tsoorder/index.vue +++ b/jnpf-java-boot/jnpf-web/src/views/example/tsoorder/index.vue @@ -182,6 +182,11 @@ export default { this.initDictData(); this.initSearchData(); }, + mounted() { + this.$nextTick(() => { + this.resizeTable(); + }); + }, watch: { '$route.query.refresh': function(newVal) { if (newVal) { @@ -200,6 +205,13 @@ export default { // 移除refresh参数,避免重复刷新 this.$router.replace({ query: {} }); } + }, + '$route.path': function(newPath, oldPath) { + if (newPath === '/example/tsoorder') { + this.$nextTick(() => { + this.resizeTable(); + }); + } } }, methods: { @@ -355,6 +367,15 @@ export default { .catch(() => { }); }, + resizeTable() { + const table = this.$refs.table; + if (table) { + const elTable = table.$refs.JNPFTable || table.$refs.table; + if (elTable && elTable.doLayout) { + elTable.doLayout(); + } + } + }, }, };