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(); + } + } + }, }, };