WIP Исправлены найденные baseInputs

This commit is contained in:
Daria Golova
2022-12-29 15:21:21 +03:00
parent c664f11bfb
commit e138bedfac
31 changed files with 200 additions and 228 deletions

View File

@@ -3,16 +3,14 @@
textarea.place-input.w-full.outline-0.not-italic.resize-none.font-medium(
v-if="!sharp"
:rows="textareaRows",
:value="value",
v-model="value",
:cols="24",
@input="$emit('update:value', $event.target.value)",
:placeholder="placeholder",
:maxLength="maxLength"
)
input.w-full.outline-0.not-italic.font-medium(
v-else,
:value="value",
@input="$emit('update:value', $event.target.value)",
v-model="value",
:placeholder="placeholder",
v-mask="sharp"
)
@@ -23,15 +21,14 @@
import { mask } from "vue-the-mask";
export default {
name: "ClientDetailInput",
emits: ["update:modelValue"],
props: {
value: String,
modelValue: String,
width: Number,
sharp: String,
placeholder: {
default: "Поиск",
},
rows: Number,
maxLength: Number,
placeholder: String,
},
directives: { mask },
computed: {
@@ -42,6 +39,14 @@ export default {
if (this.value.length <= 22) return this.rows;
return Math.ceil(this.value.length / 22);
},
value: {
get() {
return this.modelValue;
},
set(value) {
this.$emit("update:modelValue", value);
},
},
},
};
</script>