Files
dvcp_v2_webapp/project/biaopin/AppCopilotConfig/AppCopilotConfig.vue
2024-07-16 09:08:47 +08:00

36 lines
650 B
Vue

<script>
import Add from "./ccAdd.vue";
import List from "./ccList.vue";
export default {
name: "AppCopilotConfig",
label: "Copilot配置",
props: {
instance: Function,
dict: Object,
permissions: Function,
menuName: String
},
computed: {
currentPage() {
let {hash} = this.$route
return hash == "#add" ? Add : List
},
appName: v => v.menuName || v.$options.label
},
}
</script>
<template>
<section class="AppCopilotConfig">
<component :is="currentPage" v-bind="$props" :appName="appName"/>
</section>
</template>
<style scoped lang="scss">
.AppCopilotConfig {
height: 100%;
}
</style>