Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
风雨兼程620
unidocs-zh
提交
671fbaf4
unidocs-zh
项目概览
风雨兼程620
/
unidocs-zh
与 Fork 源项目一致
Fork自
DCloud / unidocs-zh
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
unidocs-zh
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
671fbaf4
编写于
12月 14, 2023
作者:
H
hdx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
webview: 修改 uni.webview.js 地址为 gitee
上级
d171e571
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
5 addition
and
5 deletion
+5
-5
docs/component/web-view.md
docs/component/web-view.md
+5
-5
未找到文件。
docs/component/web-view.md
浏览文件 @
671fbaf4
...
...
@@ -234,8 +234,8 @@
}
</script>
<!-- uni 的 SDK -->
<!-- 需要把 uni.webview.1.5.
4
.js 下载到自己的服务器 -->
<script
type=
"text/javascript"
src=
"https://
unpkg.com/@dcloudio/uni-webview-js@0.0.3/index
.js"
></script>
<!-- 需要把 uni.webview.1.5.
5
.js 下载到自己的服务器 -->
<script
type=
"text/javascript"
src=
"https://
gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/hybrid/html/uni.webview.1.5.5
.js"
></script>
<script
type=
"text/javascript"
>
// 待触发 `UniAppJSBridgeReady` 事件后,即可调用 uni 的 API。
document
.
addEventListener
(
'
UniAppJSBridgeReady
'
,
function
()
{
...
...
@@ -382,7 +382,7 @@ web-view组件在App和小程序中层级较高,如需要在vue页面中写代
-
`<web-view>`
组件默认铺满全屏并且层级高于前端组件。App端想调节大小或在其上覆盖内容需使用plus规范,H5端可以改为直接使用 iframe。
-
`<web-view>`
组件所在窗口的标题,跟随页面的
`<title>`
值的变化而变化(不含H5端)。
-
App-vue的
`web-view`
加载的html页面可以运行plus的api,但注意如果该页面调用了plus.key的API监听了back按键(或使用mui的封装),会造成back监听冲突。需要该html页面移除对back的监听。或按照上面的示例代码禁止网页使用plus对象。app-nvue页面的
`web-view`
组件不能运行plus API。
-
`uni.webview.js`
最新版地址:
[
https://git
ee.com/dcloud/uni-app/raw/dev/dist/uni.webview.1.5.4.js
](
https://gitee.com/dcloud/uni-app/raw/dev/dist/uni.webview.1.5.4
.js
)
-
`uni.webview.js`
最新版地址:
[
https://git
code.net/dcloud/hello-uni-app-x/-/blob/alpha/hybrid/html/uni.webview.1.5.5.js
](
https://gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/hybrid/html/uni.webview.1.5.5
.js
)
-
小程序平台,个人类型与海外类型的小程序使用
`web-view`
组件,提交审核时注意微信等平台是否允许使用
-
小程序平台,
`src`
指向的链接需登录小程序管理后台配置域名白名单。
`App`
和
`H5`
无此限制。
...
...
@@ -402,8 +402,8 @@ uni.webView.navigateTo 示例,注意uni sdk放到body下面
<!-- built files will be auto injected -->
</body>
<!-- uni 的 SDK -->
<!-- 需要把 uni.webview.1.5.
4
.js 下载到自己的服务器 -->
<script
type=
"text/javascript"
src=
"https://
unpkg.com/@dcloudio/uni-webview-js@0.0.3/index
.js"
></script>
<!-- 需要把 uni.webview.1.5.
5
.js 下载到自己的服务器 -->
<script
type=
"text/javascript"
src=
"https://
gitcode.net/dcloud/hello-uni-app-x/-/blob/alpha/hybrid/html/uni.webview.1.5.5
.js"
></script>
<script>
document
.
addEventListener
(
'
UniAppJSBridgeReady
'
,
function
()
{
uni
.
webView
.
getEnv
(
function
(
res
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录