update
This commit is contained in:
@@ -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() {
|
||||||
|
|||||||
Reference in New Issue
Block a user