feat: move from life cycle to data or watcher
- remove from created / mounted - initialize component services in data - use immediate watcher where appropriate - deep watch for route changes
This commit is contained in:

committed by
kolaente

parent
ebeca48be4
commit
f51371bbe0
@ -80,7 +80,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: ListModel,
|
||||
listService: ListService,
|
||||
listService: new ListService(),
|
||||
listDuplicateService: new ListDuplicateService(),
|
||||
}
|
||||
},
|
||||
components: {
|
||||
@ -93,10 +94,11 @@ export default {
|
||||
timeout: 60000,
|
||||
}),
|
||||
},
|
||||
created() {
|
||||
this.listService = new ListService()
|
||||
this.listDuplicateService = new ListDuplicateService()
|
||||
this.loadList()
|
||||
watch: {
|
||||
'$route.params.listId': {
|
||||
handler: 'loadList',
|
||||
immediate: true,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
loadList() {
|
||||
|
Reference in New Issue
Block a user