Files
dvcp-node-service/tpl/AppEntry.vue
2022-06-22 16:55:31 +08:00

37 lines
586 B
Vue

<template>
<section class="@appName">
<component :is="currentPage" v-bind="$props"/>
</section>
</template>
<script>
import List from "./list";
import Add from "./add";
export default {
name: "@appName",
components: {Add, List},
label: "@name",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentPage() {
let {hash} = this.$route
return hash == "#add" ? Add : List
}
},
created() {
this.dict.load(@dicts)
}
}
</script>
<style lang="scss" scoped>
.@appName {
height: 100%;
}
</style>