問題來源: 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的變量名
然后就可以愉快的玩耍了
!!!