mirror of
https://gitlab.com/bramw/baserow.git
synced 2025-02-14 08:58:56 +00:00
48 lines
837 B
Vue
48 lines
837 B
Vue
<template>
|
|
<div class="preview-navigation-bar-param">
|
|
<label :for="name" class="preview-navigation-bar-param__label">
|
|
{{ name }}=</label
|
|
><input
|
|
:id="name"
|
|
v-model="inputValue"
|
|
class="preview-navigation-bar-input"
|
|
/>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
defaultValue: {
|
|
type: [String, Number],
|
|
required: false,
|
|
default: '',
|
|
},
|
|
name: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
value: this.defaultValue,
|
|
}
|
|
},
|
|
computed: {
|
|
inputValue: {
|
|
get() {
|
|
return this.value
|
|
},
|
|
set(inputValue) {
|
|
this.value = inputValue
|
|
this.$emit('change', this.value)
|
|
},
|
|
},
|
|
},
|
|
watch: {
|
|
defaultValue(newValue) {
|
|
this.value = newValue
|
|
},
|
|
},
|
|
}
|
|
</script>
|