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
1019 B

<template>
<view class="d-flex align-center">
<slot name="left"></slot>
<input @input="input" @blur="$emit('blur',$event)" v-bind="{...$props}" class="flex-fill" />
<slot name="right"></slot>
</view>
</template>
<script>
export default {
name: "vInput",
props: {
value: {
defalult: "",
require: false,
},
type: {
default: "text",
type: String,
require: false,
},
placeholder: {
default: "",
type: String,
require: false,
},
maxLength: {
default: undefined,
type: String,
require: false,
},
minLength: {
default: undefined,
type: String,
require: false,
},
disabled: {
default: false,
type: Boolean,
require: false,
},
},
methods:{
input($ev){
this.$emit('input',$ev.target.value)
}
}
};
</script>
<style lang="scss">
input {
color: inherit;
font-size: inherit;
text-align: inherit;
width: auto;
min-width: 0;
}
</style>