123456789101112131415161718192021222324252627282930313233343536 |
- <template>
- <view class="webview">
- <web-view :src='url'></web-view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- title:'',
- }
- },
- onLoad(op) {
- console.log(op)
- this.url = op.url
- this.title=op.nav
- this.getWebviewPage()
- },
- methods: {
- getWebviewPage() {
- //设置 webview 界面的状态栏的 title
- uni.setNavigationBarTitle({
- title: this.title
- });
- }
- }
- }
- </script>
- <style lang="less">
- .webview {
- width: 100vw;
- height: 100vh;
- }
- </style>
|