728x90
https://blog.nachal.com/m/1507?category=0
<script>
export default {
name: 'App',
data() {
return {
newName: this.$store.state.name
}
},
methods: {
changeName() {
this.$store.dispatch('changeName', {
newName: this.newName
});
this.$router.push({path : '/'}).catch(() => {});
}
},
mounted() {
this.$router.params = this.$store.state.name;
}
}
</script>
300x250
'JavaScript' 카테고리의 다른 글
생활코딩 JavaSciprt 콜백 함수 + Ajax success(), done() 차이 (2) | 2020.04.08 |
---|
댓글