allow empty string in style editor (#1381)
This commit is contained in:
parent
da1830f9b4
commit
587be9afc0
2 changed files with 5 additions and 2 deletions
|
|
@ -26,7 +26,7 @@
|
||||||
class="textColor unstyled"
|
class="textColor unstyled"
|
||||||
:class="{ disabled: !present || disabled }"
|
:class="{ disabled: !present || disabled }"
|
||||||
type="text"
|
type="text"
|
||||||
:value="modelValue || fallback"
|
:value="modelValue ?? fallback"
|
||||||
:disabled="!present || disabled"
|
:disabled="!present || disabled"
|
||||||
@input="updateValue($event.target.value)"
|
@input="updateValue($event.target.value)"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -372,6 +372,9 @@ export default {
|
||||||
const path = getPath(component, directive)
|
const path = getPath(component, directive)
|
||||||
|
|
||||||
usedRule = get(real, path) // get real
|
usedRule = get(real, path) // get real
|
||||||
|
if (usedRule === '') {
|
||||||
|
return usedRule
|
||||||
|
}
|
||||||
if (!usedRule) {
|
if (!usedRule) {
|
||||||
usedRule = get(fallback, path)
|
usedRule = get(fallback, path)
|
||||||
}
|
}
|
||||||
|
|
@ -379,7 +382,7 @@ export default {
|
||||||
return postProcess(usedRule)
|
return postProcess(usedRule)
|
||||||
},
|
},
|
||||||
set (value) {
|
set (value) {
|
||||||
if (value) {
|
if (value != null) {
|
||||||
set(allEditedRules.value, getPath(component, directive), value)
|
set(allEditedRules.value, getPath(component, directive), value)
|
||||||
} else {
|
} else {
|
||||||
unset(allEditedRules.value, getPath(component, directive))
|
unset(allEditedRules.value, getPath(component, directive))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue