Got lyrics editing working for PATCH
This commit is contained in:
1 parent
4754d61279
commit
522e062a36
3 files changed
+94
-18
No files matched your search
+23
-2
@@ -11,6 +11,8 @@ interface InputProps {
|
||||
required?: boolean
|
||||
autocomplete?: AutocompleteType
|
||||
label?: string
|
||||
textarea?: boolean
|
||||
rows?: number
|
||||
}
|
||||
|
||||
const value = defineModel<string | File | File[] | null>("value")
|
||||
@@ -63,7 +65,7 @@ const onFileChange = (e: Event) => {
|
||||
</span>
|
||||
|
||||
<input
|
||||
v-if="props.type != 'file'"
|
||||
v-if="props.type != 'file' && props.type != 'textarea'"
|
||||
:placeholder="props.placeholder"
|
||||
v-model="value"
|
||||
@input="(e) => emit('input', e.target?.value)"
|
||||
@@ -76,6 +78,20 @@ const onFileChange = (e: Event) => {
|
||||
:autocomplete="props.autocomplete"
|
||||
/>
|
||||
|
||||
<textarea
|
||||
v-else-if="props.textarea"
|
||||
:placeholder="props.placeholder"
|
||||
v-model="value"
|
||||
@input="(e) => emit('input', e.target?.value)"
|
||||
@focus="emit('focus')"
|
||||
@blur="emit('blur')"
|
||||
:name="props.name"
|
||||
:id="props.name"
|
||||
:required="props.required"
|
||||
:autocomplete="props.autocomplete"
|
||||
:rows="props.rows"
|
||||
/>
|
||||
|
||||
<input
|
||||
v-else
|
||||
@focus="emit('focus')"
|
||||
@@ -120,7 +136,8 @@ const onFileChange = (e: Event) => {
|
||||
outline: 2px solid $color-accent;
|
||||
}
|
||||
|
||||
& input {
|
||||
& input,
|
||||
& textarea {
|
||||
width: 100%;
|
||||
background: none;
|
||||
|
||||
@@ -132,6 +149,10 @@ const onFileChange = (e: Event) => {
|
||||
}
|
||||
}
|
||||
|
||||
& textarea:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
& input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user