45 lines
827 B
Vue
45 lines
827 B
Vue
<template lang="pug">
|
|
base-input(
|
|
:type="choiceType"
|
|
v-model="value",
|
|
:placeholder="placeholder",
|
|
:maxLength="maxLength",
|
|
:mask="sharp",
|
|
:autogrow="choiceGrow",
|
|
outlined
|
|
)
|
|
slot
|
|
</template>
|
|
|
|
<script>
|
|
import BaseInput from "@/components/base/BaseInput";
|
|
|
|
export default {
|
|
name: "ClientDetailInput",
|
|
components: { BaseInput },
|
|
emits: ["update:modelValue"],
|
|
props: {
|
|
modelValue: String,
|
|
sharp: String,
|
|
maxLength: Number,
|
|
placeholder: String,
|
|
},
|
|
computed: {
|
|
choiceType() {
|
|
return !this.sharp ? "textarea" : "text";
|
|
},
|
|
choiceGrow() {
|
|
return !this.sharp ? true : false;
|
|
},
|
|
value: {
|
|
get() {
|
|
return this.modelValue;
|
|
},
|
|
set(value) {
|
|
this.$emit("update:modelValue", value);
|
|
},
|
|
},
|
|
},
|
|
};
|
|
</script>
|