mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-11 14:27:04 +08:00
44 lines
873 B
Vue
44 lines
873 B
Vue
<template>
|
|
<div v-if="myModule">
|
|
<my-module-details :myModule="myModule" @reloadMyModule="fetchMyModule"></my-module-details>
|
|
<my-module-description
|
|
:myModule="myModule"
|
|
@reloadMyModule="fetchMyModule" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import axios from '../../packs/custom_axios.js';
|
|
import MyModuleDescription from './description.vue';
|
|
import MyModuleDetails from './details.vue';
|
|
|
|
export default {
|
|
name: 'MyModuleShow',
|
|
props: {
|
|
myModuleUrl: {
|
|
type: String,
|
|
required: true
|
|
}
|
|
},
|
|
components: {
|
|
MyModuleDescription,
|
|
MyModuleDetails
|
|
},
|
|
data() {
|
|
return {
|
|
myModule: null
|
|
};
|
|
},
|
|
created() {
|
|
this.fetchMyModule();
|
|
},
|
|
methods: {
|
|
fetchMyModule() {
|
|
axios.get(this.myModuleUrl)
|
|
.then(response => {
|
|
this.myModule = response.data.data;
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|