You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

57 lines
1.1 KiB

<template>
<div class="tw-flex tw-flex-col">
<input
class="tw-bg-white tw-rounded-[12px] input-background"
:id="input.id"
:type="input.type"
:value="value"
:placeholder="input.placeHolder"
v-model="inputVal"
/>
</div>
</template>
<script>
export default {
name: "ElementInput",
props: {
input: {
type: Object,
},
default: {
type: String,
},
},
data() {
return {
value: this.default ? this.default : "",
};
},
mounted() {},
watch: {
default: {
handler: function () {
this.value = this.default;
},
},
},
computed: {
inputVal: {
get() {
return this.value;
},
set(val) {
this.value = val;
this.$emit("change", val);
},
},
},
};
</script>
<style lang="scss" scoped>
.input-background {
background: url('@/assets/svg/search.svg') no-repeat 95% 50%;
// background-position: right;
background-size: 20px;
}
</style>