40 lines
708 B
Vue
40 lines
708 B
Vue
<!-- 网页加载 -->
|
|
<template>
|
|
<s-layout :title="title" />
|
|
<view class="container">
|
|
<!-- #ifdef APP-PLUS || MP -->
|
|
<web-view :src="url" class="webview" />
|
|
<!-- #endif -->
|
|
<!-- #ifdef H5 -->
|
|
<iframe :src="url" frameborder="0" class="iframe" />
|
|
<!-- #endif -->
|
|
</view>
|
|
</template>
|
|
|
|
<script setup>
|
|
import { onLoad } from '@dcloudio/uni-app';
|
|
import { ref } from 'vue';
|
|
|
|
const url = ref();
|
|
const title = ref();
|
|
|
|
onLoad((e) => {
|
|
url.value = e.url;
|
|
title.value = e.title;
|
|
console.log(e);
|
|
});
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.container {
|
|
width: 100%;
|
|
height: 100vh;
|
|
}
|
|
|
|
.webview,
|
|
.iframe {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|