・
Reviews 5
・
Average rating 4.6
While developing with Vue, I wanted to get a taste of how to develop based on TypeScript, and I listened to a good lecture. Since Vue 3.0 is coming out soon, I also want to develop SPA based on TS (more TS-friendly?)! Thank you. The last TODO example was processed by attaching a watch to the route.. It's not a good way.. But it works as I want.. I'll refactor it a bit more later when I have time or leave it as is! ㅠㅠㅋㅋ @Watch('$route') public watchRouteParam(after: any, before: any) { if (after.params.hasOwnProperty('path')) { switch (after.params.path) { case 'list-active' : this.todoData = this.$store.getters.todoActiveItem; break; case 'list-clear' : this.todoData = this.$store.getters.todoClearItem; break; } } else { this.todoData = this.$store.getters.todoItem; } }