42 lines
696 B
Vue
42 lines
696 B
Vue
<template>
|
|
<div class="AppGridBlock">
|
|
<keep-alive include="List">
|
|
<component :is="currentPage" :instance="instance" :dict="dict"/>
|
|
</keep-alive>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import List from "./components/list";
|
|
import Add from "./components/add";
|
|
|
|
export default {
|
|
name: "AppGridBlock",
|
|
label: "网格区块",
|
|
|
|
props: {
|
|
instance: Function,
|
|
dict: Object,
|
|
},
|
|
computed: {
|
|
currentPage() {
|
|
return this.$route.hash == "#add" ? Add : List
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
component: "List",
|
|
};
|
|
},
|
|
components: {Add, List},
|
|
};
|
|
</script>
|
|
|
|
<style lang="scss">
|
|
.AppGridBlock {
|
|
height: 100%;
|
|
background: #f3f6f9;
|
|
overflow: auto;
|
|
}
|
|
</style>
|