[fix]修复创建资产tree组件异常

This commit is contained in:
OrangeM21
2020-06-02 01:50:52 +08:00
parent 931a18e3ad
commit 9f0e4e903e
5 changed files with 27 additions and 14 deletions

View File

@@ -16,7 +16,7 @@
</div>
</div>
<div class="transition-box" style="width: calc(100% - 17px);">
<ListTable :table-config="iTableConfig" :header-actions="headerActions" />
<ListTable ref="ListTable" :key="componentKey" :table-config="iTableConfig" :header-actions="headerActions" />
</div>
</div>
</div>
@@ -53,12 +53,21 @@ export default {
data() {
return {
iTableConfig: this.tableConfig,
iShowTree: this.showTree
iShowTree: this.showTree,
componentKey: 0
}
},
watch: {
},
methods: {
handleUrlChange(_url) {
this.$set(this.iTableConfig, 'url', _url)
this.forceRerender()
},
forceRerender() {
this.componentKey += 1
}
}
}