zoukankan      html  css  js  c++  java
  • Vue SPA应用中使用Layer的iframe 弹出层,并且传值

    问题来源: BOOS 竟然说喜欢有可移动可最大化的弹出层,这!!!

     SPA 模式下就是这种引入Vue.js的写法

    layer.open({
               type: 2,
               area: ['840px', '550px'],
               fixed: false, //不固定
               maxmin: true,
               title:title,
               content:url,
           });

    正常引入layui.js  然后弹出,然后弹出层要调用父级层的方法,和赋值

         var index = parent.layer.getFrameIndex(window.name); //获取窗口索引
    
                        parent.app.UserCheckCount=this.UserCheckCount;
                        parent.app.UserCheckList=this.UserCheckList;
                        parent.app.QuestionSelectList=this.QuestionSelectList;
    
    
                        parent.app.FatherQuestionList=this.QuestionSelectList;
                        parent.app.FatherQuestionMake();
    
                        console.log(parent.app.QuestionList);
                        parent.app.QuestionSelectKey=this.QuestionSelectKey;
                        parent.app.QuesctionPageMake();
    
                        parent.layer.close(index);

    注意app是父级new 出来Vue的变量名

    然后就可以愉快的玩耍了

    !!!

  • 相关阅读:
    [Apio2014]回文串
    省队集训day6 C
    省队集训day6 B
    省队集训Day3 light
    省队集训Day3 tree
    多串匹配
    ubuntu卸载福昕阅读器
    greenlet
    python multithread task_done
    mysql参数调优
  • 原文地址:https://www.cnblogs.com/wlphp/p/10542386.html
Copyright © 2011-2022 走看看