|
[App引擎]
officePreview无法预览pdf和excel文件
[复制链接]
本帖最后由 BIP912152 于 2023-6-20 18:51 编辑
pdf文件打开一片黑,xls和xlsx结尾的文件打开就会卡住,软件没有响应
代码如下:
let office = api.require('officePreview');
office.open({
// rect:{
// x:0, y:safeHeight,w:api.winWidth, h:api.frameHeight
// },
rect:{
x:0, y:api.safeArea.top+40,w:api.winWidth, h:'auto'
},
fixedOn:api.frameName,
fixed:true,
url:ret.savePath,
fileType: ret.savePath.substr(ret.savePath.lastIndexOf('.') + 1)
});
|
|