//设置子窗口属性:大小,位置等//设置子窗口位置
sub.subWindowClass.moveWindowTo(sub.positionX,sub.positionY,(err:BusinessError,data)=>{if(err.code){
console.error('Failed to move the window.Cause:'+JSON.stringify(err))return}
console.info('succeded in moving the sub window')})// 设置子窗口大小
sub.subWindowClass.resize(sub.windowWidth,sub.windowHeight,(err:BusinessError,data)=>{if(err.code){
console.error('Failed to set the sub window size.Cause:'+JSON.stringify(err))return}
console.info('Succeded in setting the sub window size')})//设置子窗口是否可触
sub.subWindowClass.setWindowTouchable(true,(err:BusinessError,data)=>{if(err.code){
console.error('set window touch Failed'+JSON.stringify(err))return}
console.info('set window touch succeeded')})// 设置子窗口是否全屏(能够设置的前提是未设置子窗口的位置和大小)
sub.subWindowClass.setWindowLayoutFullScreen(false,(err:BusinessError,data)=>{if(err.code){
console.error('set window layout full screen Failed'+JSON.stringify(err))return}
console.info('set window layout full screen succeeded')})//加载子窗口页面
sub.subWindowClass.setUIContent(sub.windowPath,(err:BusinessError,data)=>{if(err.code){
console.error('set sub ui content Failed. Cause:'+JSON.stringify(err))return}
console.info('set sub window ui content succeeded')})//显示子窗口内容
sub.subWindowClass.showWindow((err:BusinessError,data)=>{if(err.code){
console.error('show sub window Failed.Cause:'+JSON.stringify(err))return}
console.info('show sub window succeeded')})