Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
r15132706585
uni-app
提交
6c67d71f
U
uni-app
项目概览
r15132706585
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
6c67d71f
编写于
4月 08, 2020
作者:
雪洛
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
docs: v3 this.$mp.page --> this.$scope
上级
cddfc297
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
6 addition
and
5 deletion
+6
-5
docs/collocation/frame/window.md
docs/collocation/frame/window.md
+1
-1
docs/component/input.md
docs/component/input.md
+3
-2
docs/component/web-view.md
docs/component/web-view.md
+2
-2
未找到文件。
docs/collocation/frame/window.md
浏览文件 @
6c67d71f
...
...
@@ -54,7 +54,7 @@ export default {
},
onLoad() {
// #ifdef APP-PLUS
const currentWebview = this.$
mp.page.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里,直接使用plus.webview.currentWebview()无效
const currentWebview = this.$
scope.$getAppWebview(); //此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
currentWebview.setBounce({position:{top:'100px'},changeoffset:{top:'0px'}}); //动态重设bounce效果
// #endif
}
...
...
docs/component/input.md
浏览文件 @
6c67d71f
...
...
@@ -83,9 +83,10 @@ App平台在iOS上,webview中的软键盘弹出时,默认在软键盘上方
-
如需使用js动态设置softinputNavBar
```
javascript
this
.
$
mp
.
pag
e
.
$getAppWebview
().
setStyle
({
this
.
$
scop
e
.
$getAppWebview
().
setStyle
({
softinputNavBar
:
'
none
'
})
})
//this.$scope.$getAppWebview()相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
```
如果是nvue页面,默认就没有键盘上方的横条,无需任何设置。
...
...
docs/component/web-view.md
浏览文件 @
6c67d71f
...
...
@@ -194,7 +194,7 @@ var wv;//计划创建的webview
export
default
{
onReady
()
{
// #ifdef APP-PLUS
var
currentWebview
=
this
.
$
mp
.
page
.
$getAppWebview
()
//获取当前页面的webview对象
var
currentWebview
=
this
.
$
scope
.
$getAppWebview
()
//此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
setTimeout
(
function
()
{
wv
=
currentWebview
.
children
()[
0
]
wv
.
setStyle
({
top
:
150
,
height
:
300
})
...
...
@@ -222,7 +222,7 @@ export default {
top
:
uni
.
getSystemInfoSync
().
statusBarHeight
+
44
//放置在titleNView下方。如果还想在webview上方加个地址栏的什么的,可以继续降低TOP值
})
wv
.
loadURL
(
"
https://www.baidu.com
"
)
var
currentWebview
=
this
.
$
mp
.
page
.
$getAppWebview
()
//获取当前页面的webview对象
var
currentWebview
=
this
.
$
scope
.
$getAppWebview
();
//此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效,非v3编译模式使用this.$mp.page.$getAppWebview()
currentWebview
.
append
(
wv
);
//一定要append到当前的页面里!!!才能跟随当前页面一起做动画,一起关闭
setTimeout
(
function
()
{
console
.
log
(
wv
.
getStyle
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录