9***@qq.com
9***@qq.com
  • 发布:2022-04-13 15:34
  • 更新:2022-04-14 15:34
  • 阅读:350

nvue页面使用web-view查看pdf无滑动条,来个兄弟帮忙一下啊

分类:nvue
<web-view v-if='url != "" && isShowPdf' :src="url"  
                    style="width: 100%;height: 1500px;margin: 20px 0px;"></web-view>
viewerUrl: '/hybrid/html/web/viewer.html',  

// 判断是手机系统:安卓,使用pdf.js  
                // #ifdef APP-PLUS  
                var pdfUrl = "@/../../../../static/pdf/test.pdf";  
                if (plus.os.name === 'Android') {  
                    this.url = `${this.viewerUrl}?file=${encodeURIComponent(pdfUrl)}`;  
                }  
                // ios,直接访问pdf所在路径  
                else {  
                    this.url = encodeURIComponent(pdfUrl);  
                }  
                console.log(this.url)  
                this.$nextTick(() => {  
                    this.countDownStart = true;  

                    this.isShowPdf = true;  
                });  
                // #endif

关键代码如上,在nvue页面查看pdf无法向下滑动。。。高度被定的高度卡死了,,,,overflow也没用。。。就是没有滑动条

结果如附件

感觉是bug啊,来个uni的工作人员啊!!!

2022-04-13 15:34 负责人:无 分享
已邀请:
9***@qq.com

9***@qq.com (作者)

组件出现双滑动条就会出现查看pdf的组件无法滑动的bug,

暂定解决方案:position:fixed,然后宽高铺满整个屏幕可用区域。。。。

但是又出现了新的问题,nvue页面无法用z-index层级,,,,吐了

该问题目前已经被锁定, 无法添加新回复