Blame view

merchant-web-master/src/views/couponmanagement/allinfo.vue 1.04 KB
8db25941   李宇   2
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
  <template>
    <div>
      <!-- 根据 type 的值决定显示哪个组件 -->
      <capitalpoolinfo ref="capitalpoolinforef" v-if="type == '1'" @changecouponid="changecouponid"/>
      <couponinfo ref="couponinforef" v-else-if="type == '2'" @changecouponid="changecouponid"/>
    </div>
  </template>
  
  <script>
  import capitalpoolinfo from './capitalpoolinfo.vue';
  import couponinfo from './couponinfo.vue';
  
  export default {
    components: {
      capitalpoolinfo,
      couponinfo
    },
    props: {
      type: {
        type: String,
        required: '1'
      },
    },
    data() {
      return {
        id: ''
      }
    },
    methods: {
      int(e) {
          if(this.type === '1'){
            this.$refs.capitalpoolinforef.int(e)
          }else{
            this.$refs.couponinforef.int(e)
          }
      },
      chanetype(e) {
          this.type = e
      },
      changecouponid(e) {
          console.error(e)
          this.$emit('changetypeinfo','2')
          // this.$refs.couponinforef.int(e)
      },
      changecapitalpoolid(e) {
         
      },
    },
  };
  </script>
  
  <style scoped>
  /* 添加样式 */
  </style>