jhzh
2025-04-03 db12897dc68c68d40c557aa59ad78022e2b30ac2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<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>