.
This commit is contained in:
parent
2ea711903e
commit
ca253a2cd4
@ -1,11 +1,13 @@
|
||||
<template>
|
||||
<custom-nav-bar :left="true" :title="params.title" />
|
||||
<view v-if="params.url">
|
||||
<web-view style="margin-top: 45px;" :webview-styles="webviewStyles" :src="`${params.url}`"></web-view>
|
||||
<web-view style="margin-top: 45px;" :webview-styles="webviewStyles"
|
||||
:src="`${params.url}`"></web-view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
var wv; //计划创建的webvie
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
@ -30,6 +32,18 @@
|
||||
// title: event.title
|
||||
// })
|
||||
// }
|
||||
},
|
||||
onReady() {
|
||||
// #ifdef APP-PLUS
|
||||
//此对象相当于html5plus里的plus.webview.currentWebview()。在uni-app里vue页面直接使用plus.webview.currentWebview()无效
|
||||
var currentWebview = this.$scope.$getAppWebview()
|
||||
setTimeout(function() {
|
||||
wv = currentWebview.children()[0]
|
||||
wv.setStyle({
|
||||
top: 60
|
||||
})
|
||||
}, 100); //如果是页面初始化调用时,需要延时一下
|
||||
// #endif
|
||||
}
|
||||
}
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user