fix font control
This commit is contained in:
parent
75f6506bc7
commit
53cde52027
2 changed files with 7 additions and 6 deletions
|
@ -6,11 +6,12 @@ export default {
|
||||||
Select
|
Select
|
||||||
},
|
},
|
||||||
props: [
|
props: [
|
||||||
'name', 'label', 'value', 'fallback', 'options', 'no-inherit'
|
'name', 'label', 'modelValue', 'fallback', 'options', 'no-inherit'
|
||||||
],
|
],
|
||||||
|
emits: ['update:modelValue'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
lValue: this.value,
|
lValue: this.modelValue,
|
||||||
availableOptions: [
|
availableOptions: [
|
||||||
this.noInherit ? '' : 'inherit',
|
this.noInherit ? '' : 'inherit',
|
||||||
'custom',
|
'custom',
|
||||||
|
@ -22,7 +23,7 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpdate () {
|
beforeUpdate () {
|
||||||
this.lValue = this.value
|
this.lValue = this.modelValue
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
present () {
|
present () {
|
||||||
|
@ -37,7 +38,7 @@ export default {
|
||||||
},
|
},
|
||||||
set (v) {
|
set (v) {
|
||||||
set(this.lValue, 'family', v)
|
set(this.lValue, 'family', v)
|
||||||
this.$emit('input', this.lValue)
|
this.$emit('update:modelValue', this.lValue)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
isCustom () {
|
isCustom () {
|
||||||
|
|
|
@ -14,8 +14,8 @@
|
||||||
:id="name + '-o'"
|
:id="name + '-o'"
|
||||||
class="opt exlcude-disabled"
|
class="opt exlcude-disabled"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
:modelValue="present"
|
:checked="present"
|
||||||
@input="$emit('update:modelValue', typeof value === 'undefined' ? fallback : undefined)"
|
@change="$emit('update:modelValue', typeof modelValue === 'undefined' ? fallback : undefined)"
|
||||||
>
|
>
|
||||||
<label
|
<label
|
||||||
v-if="typeof fallback !== 'undefined'"
|
v-if="typeof fallback !== 'undefined'"
|
||||||
|
|
Loading…
Reference in a new issue