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