<template>
  <div>
    <el-button type="primary" @click="showCard">点击弹窗</el-button>
    <vue-gic-card :projectName="projectName" :disabledList="disabledList" :showCardDialog="showCardDialog" :cardLimit="cardLimit" :cardType="cardType" @selectCard="selectCard"></vue-gic-card>

    数据：{{value}}
  </div>
</template>
<script>
import vueGicCard from '../component/dm-card'
  export default {
    components:{
      'vue-gic-card':vueGicCard
    },
    data() {
      return {
        // 可传参数
        projectName: '', //当前项目名
        showCardDialog: false,
        cardLimit: 1, //卡券限制类型 1-限制领取1张的卡券 2- 限制领取 1~100的卡券 3-限制领取>=100 的卡券
        cardType: null, //卡券类型集合（0：抵金券，1：折扣券，2：兑换券）null-为全部类型 逗号分隔
        disabledList:['00000000645a09d40164686a901800c0','00000000645a09d40164686ffcf500ca'],
        value:{},
        value1:''
      }
    },
    methods: {
        // 显示卡券弹窗
        showCard() {
          this.showCardDialog = true;
        },
        // 子组件触发方法
        selectCard(val) {
          this.value = val;
          this.showCardDialog = false;
        }
    },
  };
</script>

