WIP Исправлены найденные baseInputs
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user