fix shadow control in theme tab
This commit is contained in:
parent
ccd7378347
commit
1d77063a4b
1 changed files with 6 additions and 5 deletions
|
@ -30,18 +30,19 @@ const toModel = (object = {}) => ({
|
||||||
})
|
})
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// 'Value' and 'Fallback' can be undefined, but if they are
|
// 'modelValue' and 'Fallback' can be undefined, but if they are
|
||||||
// initially vue won't detect it when they become something else
|
// initially vue won't detect it when they become something else
|
||||||
// therefore i'm using "ready" which should be passed as true when
|
// therefore i'm using "ready" which should be passed as true when
|
||||||
// data becomes available
|
// data becomes available
|
||||||
props: [
|
props: [
|
||||||
'value', 'fallback', 'ready'
|
'modelValue', 'fallback', 'ready'
|
||||||
],
|
],
|
||||||
|
emits: ['update:modelValue'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
selectedId: 0,
|
selectedId: 0,
|
||||||
// TODO there are some bugs regarding display of array (it's not getting updated when deleting for some reason)
|
// TODO there are some bugs regarding display of array (it's not getting updated when deleting for some reason)
|
||||||
cValue: (this.value || this.fallback || []).map(toModel)
|
cValue: (this.modelValue || this.fallback || []).map(toModel)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
|
@ -70,7 +71,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpdate () {
|
beforeUpdate () {
|
||||||
this.cValue = this.value || this.fallback
|
this.cValue = this.modelValue || this.fallback
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
anyShadows () {
|
anyShadows () {
|
||||||
|
@ -105,7 +106,7 @@ export default {
|
||||||
!this.usingFallback
|
!this.usingFallback
|
||||||
},
|
},
|
||||||
usingFallback () {
|
usingFallback () {
|
||||||
return typeof this.value === 'undefined'
|
return typeof this.modelValue === 'undefined'
|
||||||
},
|
},
|
||||||
rgb () {
|
rgb () {
|
||||||
return hex2rgb(this.selected.color)
|
return hex2rgb(this.selected.color)
|
||||||
|
|
Loading…
Reference in a new issue