在uniappx中代码大概是这样的
<web-view :src="/static/html/web/viewer.html?file=需要加载的本地文件"></web-view>
安卓平台,文件路径在/sdcard/Android/data/x.x.x/files 路径下,需要由viewer.html加载.
查了下百度说需要设置webSettings.setAllowFileAccess(true); 但在文档中也找不到怎么设置
在uniappx中代码大概是这样的
<web-view :src="/static/html/web/viewer.html?file=需要加载的本地文件"></web-view>
安卓平台,文件路径在/sdcard/Android/data/x.x.x/files 路径下,需要由viewer.html加载.
查了下百度说需要设置webSettings.setAllowFileAccess(true); 但在文档中也找不到怎么设置
0 个回复