网格区块基本调整完毕

This commit is contained in:
aixianling
2022-05-31 18:33:43 +08:00
parent a09048af63
commit e71d1fcf12
7 changed files with 693 additions and 907 deletions

View File

@@ -1,15 +1,7 @@
<template>
<div class="AppGridBlock">
<keep-alive include="List">
<component
ref="component"
:is="component"
@change="onChange"
:params="params"
:instance="instance"
:dict="dict"
:isEdit="isEdit"
></component>
<component :is="currentPage" :instance="instance" :dict="dict"/>
</keep-alive>
</div>
</template>
@@ -26,44 +18,17 @@ export default {
instance: Function,
dict: Object,
},
computed: {
currentPage() {
return this.$route.hash == "#add" ? Add : List
}
},
data() {
return {
component: "List",
params: {},
include: [],
isEdit: false
};
},
components: {
Add,
List,
},
mounted() {},
methods: {
onChange(data) {
if (data.type === "Add") {
this.component = "Add";
this.params = data.params;
this.isEdit = data.isEdit
}
if (data.type === "list") {
this.component = "List";
this.params = data.params;
this.$nextTick(() => {
if (data.isRefresh) {
this.$refs.component.getList()
this.$refs.component.getTreeList()
}
});
}
},
},
components: {Add, List},
};
</script>