陶杰
2024-12-29 2581f9ae47ed8342b1494bc84f4236dcedb66fbc
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
<template>
  <div class="copy-textarea">
    <div>
      <span style="color:red;">手动输入最多支持100个号码,大批量号码建议通过文件导入形式提交</span>
      <el-button type="text" @click="clearVal">点击清空</el-button></div>
    <el-input type="textarea" :rows="5" v-model="currentValue"
      placeholder="提示:一行输入一个号码,多个手机号请换行隔开。"
      width="80%"
      @change="handlerInputChange"
    ></el-input>
    <div>
      <span style="color:gray;">提示:一行输入一个号码,多个手机号请换行隔开。</span>
    </div>
   
  </div>
</template>
 
<script>
import cloneDeep from 'lodash.clonedeep'
export default {
  props: {
    value: {
      type: String,
      default:'',
    },
    disabled: {
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      dialogVisible: false,
      currentValue: '',
    }
  },
  watch: {
    value: {
      immediate: true,
      handler(value) {
        this.currentValue = value 
      },
    },
  },
  methods: {
    clearVal(){
      this.$elBusUtil
        .confirm('确定要清空吗?')
        .then(() => {
          this.currentValue = ''
          this.$emit('input', '')
          this.$emit('change', '')
        })
        .catch(() => {})
    },
    handlerInputChange(){
      this.$emit('input', this.currentValue)
      this.$emit('change', this.currentValue)
    }
  },
}
</script>
 
<style lang="scss" scoped>
.copy-textarea {
}
</style>
<style lang="scss">
.shop-user-dialog {
  .dialog-container {
    display: flex;
    align-items: flex-start;
    &__list {
      flex: 1;
      border-right: 1px solid #eee;
      height: 100%;
    }
    &__selected {
      width: 40%;
      height: 100%;
      padding: 24px;
      .el-bus-title {
        margin-bottom: 15px;
      }
      .el-tag {
        margin-right: 6px;
        margin-bottom: 6px;
      }
    }
  }
}
</style>