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:
parent
ebeca48be4
commit
f51371bbe0
59 changed files with 246 additions and 376 deletions
|
|
@ -48,16 +48,16 @@ export default {
|
|||
},
|
||||
},
|
||||
watch: {
|
||||
value(newVal) {
|
||||
this.color = newVal
|
||||
value: {
|
||||
handler(value) {
|
||||
this.color = value
|
||||
},
|
||||
immediate: true,
|
||||
},
|
||||
color() {
|
||||
this.update()
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.color = this.value
|
||||
},
|
||||
computed: {
|
||||
empty() {
|
||||
return this.color === '#000000' || this.color === ''
|
||||
|
|
|
|||
Reference in a new issue