fix 暂时取消组件销毁操作
This commit is contained in:
@@ -83,11 +83,12 @@ export default {
|
||||
const pane = this.panes.find((p) => p.key === key);
|
||||
|
||||
// 打开之前先销毁
|
||||
const index = this.panes.indexOf(pane);
|
||||
const component = this.$refs.panes && this.$refs.panes[index];
|
||||
if (component) {
|
||||
component.$destroy();
|
||||
}
|
||||
// 销毁后重新生成的组件会放置到$refs.panes的最后,所以这里直接根据索引取是错误的
|
||||
// const index = this.panes.indexOf(pane);
|
||||
// const component = this.$refs.panes && this.$refs.panes[index];
|
||||
// if (component) {
|
||||
// component.$destroy();
|
||||
// }
|
||||
|
||||
const i = import(`@/pages${pane.path}`);
|
||||
pane.component = () => i;
|
||||
|
||||
Reference in New Issue
Block a user