Files
dvcp_v2_webapp/project/xumu/AppWeightManage/AppWeightManage.vue
aixianling 0ef83a945f refactor(BUG 538): 调整字典数据加载时机
- 移除 add.vue 中的 created 钩子中的字典加载逻辑
- 在 AppWeightManage.vue 中添加 created 钩子,统一处理字典加载
2025-01-14 11:26:01 +08:00

36 lines
638 B
Vue

<script>
import add from "./add.vue";
import list from "./list.vue";
export default {
name: "AppWeightManage",
label: "体重管理",
props: {
instance: Function,
dict: Object,
permissions: Function
},
computed: {
currentPage() {
let {hash} = this.$route
return hash == "#add" ? add : list
}
},
created() {
this.dict.load( "yesOrNo", "category", "variety", "dataSources")
},
}
</script>
<template>
<section class="AppWeightManage">
<component :is="currentPage" v-bind="$props"/>
</section>
</template>
<style scoped lang="scss">
.AppWeightManage {
height: 100%;
}
</style>