• vue父子页面传值问题


    父 :

       
        
    
        
        
        
        
      
    //拒绝认领
    refuseClaim(row) {
      this.reasonId = row.id
      this.typs = row.type;
      this.showRefuseClaimIndex = true
      if (this.showRefuseClaimIndex) {
        setTimeout(() => {
          this.$refs.refuseClaimIndex.openDialog(row.type)
        }, 300)
      }
    },

    子: 

    
      
        
      
      
        
    
      
    
      
        
    
      
    
    props: {
      reasonId: '',
      types: null
    },
    data() {
      return {
        dialogVisible: false,
        dlPd:false,
        ygPd:false,
        ruleForm: {
          reason: '',
          zglszllnum: 0,
        },
        id: '',
        rules: {
          reason: [
            {required: true, message: '请填写原因', trigger: 'blur'}
          ],
          zglszllnum: [
            {required: true, message: '请填写实际载流量/功率', trigger: 'blur'}
          ]
        }
      };
    },

    changeType(){
      //判断电流还是
        if (this.types ==0){
          //显示电流
          this.dlPd = true
          this.ygPd = false
        }else if (this.types ==1){
          //显示有功
          this.dlPd = false
          this.ygPd = true
        }
    },
    openDialog(data) {
      alert(data)
      this.dialogVisible = true;
      this.changeType();
    },

    方法二:

      
    
      
      
      
      
    
    //拒绝认领
    refuseClaim(row) {
      this.reasonId = row.id
      this.formLabel = row.type==0?'实际电流':'实际功率'
      this.showRefuseClaimIndex = true
      if (this.showRefuseClaimIndex) {
        setTimeout(() => {
          this.$refs.refuseClaimIndex.openDialog()
        }, 300)
      }
    },
    
      
        
          
        
        
          
        
      
      
          确认
          取消
      
    
    props: {
      reasonId: '',
      formLabel: '',
    },

     

    openDialog() {
      this.dialogVisible = true;
    },

  • 相关阅读:
    python实现excel的数据提取
    基于matomo实现业务数据埋点采集上报
    SINetv2:Concealed Object Detection——论文简述
    一个已经存在10年,却被严重低估的 Python 库
    基于SSH开发企业内部邮件系统
    数字化转型背景下企业知识管理能力提升路径
    【小余送书活动第四期】《Kali Linux高级渗透测试》,不可多的的网安书籍哦!网络安全的朋友抓紧参与活动领书咯!
    2023国自然淘金:m6A与糖酵解、铁死亡和巨噬细胞如何强强联姻?
    java String.format使用 %d
    看到一本Spring源码笔记,里面的源码竟如此通俗易懂,原来是阿里产的
  • 原文地址:https://blog.csdn.net/Theshy08/article/details/126285036