2021-08-18 00:01:11 +02:00
|
|
|
<template>
|
|
|
|
<div class="w-full">
|
2021-10-28 21:41:42 +02:00
|
|
|
<p class="px-1 text-sm font-semibold" :class="disabled ? 'text-gray-400' : ''">{{ label }}</p>
|
2022-03-26 17:59:34 +01:00
|
|
|
<ui-textarea-input ref="input" v-model="inputValue" :disabled="disabled" :rows="rows" class="w-full" />
|
2021-08-18 00:01:11 +02:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
value: [String, Number],
|
|
|
|
label: String,
|
2021-10-28 21:41:42 +02:00
|
|
|
disabled: Boolean,
|
2021-08-18 00:01:11 +02:00
|
|
|
rows: {
|
|
|
|
type: Number,
|
|
|
|
default: 2
|
|
|
|
}
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {}
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
inputValue: {
|
|
|
|
get() {
|
|
|
|
return this.value
|
|
|
|
},
|
|
|
|
set(val) {
|
|
|
|
this.$emit('input', val)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-03-26 17:59:34 +01:00
|
|
|
methods: {
|
|
|
|
blur() {
|
|
|
|
if (this.$refs.input && this.$refs.input.blur) {
|
|
|
|
this.$refs.input.blur()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2021-08-18 00:01:11 +02:00
|
|
|
mounted() {}
|
|
|
|
}
|
|
|
|
</script>
|