Последняя версия с сервера прошлого разработчика
This commit is contained in:
30
resources/js/Shared/Form/TextareaInput.vue
Executable file
30
resources/js/Shared/Form/TextareaInput.vue
Executable file
@@ -0,0 +1,30 @@
|
||||
<template>
|
||||
<label class="text-gray-light text-lg mb-2" v-if="label" :for="id">{{ label }}:</label>
|
||||
<textarea :id="id" ref="input" v-bind="$attrs" :class="{ error: error }" :value="modelValue" @input="$emit('update:modelValue', $event.target.value)" />
|
||||
<div v-if="error" class="text-red text-sm">{{ error }}</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
inheritAttrs: false,
|
||||
props: {
|
||||
id: {
|
||||
type: String,
|
||||
default() {
|
||||
return `select-input-${Math.random() * 1000}`;
|
||||
},
|
||||
},
|
||||
modelValue: String,
|
||||
label: String,
|
||||
error: String,
|
||||
},
|
||||
methods: {
|
||||
focus() {
|
||||
this.$refs.input.focus()
|
||||
},
|
||||
select() {
|
||||
this.$refs.input.select()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user