无等级网格版合并

This commit is contained in:
aixianling
2022-06-13 09:39:19 +08:00
parent 0736ea98d0
commit 2a4d9b2b1c
67 changed files with 1490 additions and 16970 deletions

View File

@@ -1,16 +1,6 @@
<template>
<div class="AppGridBlock">
<keep-alive include="List">
<component
ref="component"
:is="component"
@change="onChange"
:params="params"
:instance="instance"
:dict="dict"
:isEdit="isEdit"
></component>
</keep-alive>
<component :is="currentPage" :instance="instance" :dict="dict"/>
</div>
</template>
@@ -26,44 +16,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>