This commit is contained in:
leejinseok
2020-02-14 16:00:33 +09:00
parent 49d82db96d
commit 68d7abb776

View File

@@ -23,16 +23,18 @@
</template> </template>
<script> <script>
import authService from "../../services/authService";
import articleService from "../../services/articleService"; import articleService from "../../services/articleService";
export default { export default {
name: "Detail", name: "Detail",
props: {
startSpin: Function,
stopSpin: Function
},
data() { data() {
return { return {
article: {}, article: {},
init: false, init: false,
test: ""
}; };
}, },
async beforeCreate() { async beforeCreate() {
@@ -40,8 +42,10 @@
articleService.removeArticle = articleService.removeArticle.bind(this); articleService.removeArticle = articleService.removeArticle.bind(this);
}, },
async created() { async created() {
this.startSpin();
this.article = await articleService.getArticle(this.$route.params.id); this.article = await articleService.getArticle(this.$route.params.id);
this.init = true; this.init = true;
this.stopSpin(true);
}, },
methods: { methods: {
async remove() { async remove() {