Rename some attrs etc. for buefy components used with oruga

This commit is contained in:
Lance Edgar 2024-05-06 22:56:47 -05:00
parent 3d319cbd09
commit f0d694cfe5

View file

@ -23,7 +23,7 @@
<%def name="make_b_autocomplete_component()">
<script type="text/x-template" id="b-autocomplete-template">
<o-autocomplete v-model="buefyValue"
<o-autocomplete v-model="orugaValue"
:data="data"
:field="field"
:open-on-focus="openOnFocus"
@ -32,7 +32,7 @@
:clear-on-select="clearOnSelect"
:formatter="customFormatter"
:placeholder="placeholder"
@update:model-value="buefyValueUpdated"
@update:model-value="orugaValueUpdated"
ref="autocomplete">
</o-autocomplete>
</script>
@ -52,13 +52,13 @@
},
data() {
return {
buefyValue: this.modelValue,
orugaValue: this.modelValue,
}
},
watch: {
modelValue(to, from) {
if (this.buefyValue != to) {
this.buefyValue = to
if (this.orugaValue != to) {
this.orugaValue = to
}
},
},
@ -67,7 +67,7 @@
const input = this.$refs.autocomplete.$el.querySelector('input')
input.focus()
},
buefyValueUpdated(value) {
orugaValueUpdated(value) {
this.$emit('update:modelValue', value)
},
},
@ -174,8 +174,8 @@
<%def name="make_b_datepicker_component()">
<script type="text/x-template" id="b-datepicker-template">
<o-datepicker :name="name"
v-model="buefyValue"
@update:model-value="buefyValueUpdated"
v-model="orugaValue"
@update:model-value="orugaValueUpdated"
:value="value"
:placeholder="placeholder"
:date-formatter="dateFormatter"
@ -203,18 +203,18 @@
},
data() {
return {
buefyValue: this.modelValue,
orugaValue: this.modelValue,
}
},
watch: {
modelValue(to, from) {
if (this.buefyValue != to) {
this.buefyValue = to
if (this.orugaValue != to) {
this.orugaValue = to
}
},
},
methods: {
buefyValueUpdated(value) {
orugaValueUpdated(value) {
if (this.modelValue != value) {
this.$emit('update:modelValue', value)
}
@ -329,7 +329,7 @@
<script type="text/x-template" id="b-input-template">
<o-input :type="type"
:disabled="disabled"
v-model="buefyValue"
v-model="orugaValue"
@update:modelValue="val => $emit('update:modelValue', val)"
:autocomplete="autocomplete"
ref="input">
@ -347,13 +347,13 @@
},
data() {
return {
buefyValue: this.modelValue
orugaValue: this.modelValue
}
},
watch: {
modelValue(to, from) {
if (this.buefyValue != to) {
this.buefyValue = to
if (this.orugaValue != to) {
this.orugaValue = to
}
},
},