pass computeColor into shadow control, fix shadow switching types due to invalid shadow color

This commit is contained in:
Henry Jameson 2024-10-12 01:26:29 +03:00
commit 098c6af7ef
7 changed files with 19 additions and 7 deletions

View file

@ -46,6 +46,7 @@ export default {
'separateInset',
'noPreview',
'disabled',
'computeColor',
'compact'
],
emits: ['update:modelValue', 'subShadowSelected'],
@ -107,6 +108,13 @@ export default {
usingFallback () {
return this.modelValue == null
},
getFallback () {
if (typeof this.computeColor === 'function' && this.selected?.color) {
return this.computeColor(this.selected.color)
} else {
return this.currentFallback?.color
}
},
style () {
try {
if (this.separateInset) {