windowDialog组件可以实现页面跳转
xid:windowDialog
src:$UI/lohas/detailedknowledge.w
父页:myknowledge.w
Model.prototype.row1Click = function(event){
var row = event.bindingContext.$object;
var id = row.val("content");
var params = {"id":id}; 把id放入params中
this.comp("windowDialog1").open({data:params}); 把参数params给组件
};
子页:detailedknowledge.w
Model.prototype.windowReceiver1Receive = function(event){
var self = this;
var params = event.data; 获取params
title = params.id; 获得id
// document.write(title);
this.getElementByXid("content1").innerHTML = title; 赋值
};