38 lines
614 B
Vue
Raw Permalink Normal View History

2024-12-09 14:16:57 +08:00
<template>
<view v-if="params.url">
<web-view :src="`${params.url}`"></web-view>
<u-loading-page :loading="loading"></u-loading-page>
</view>
</template>
<script>
export default {
data () {
return {
loading: true,
params: {}
}
},
props: {
src: {
type: [String],
default: null
}
},
onLoad (event) {
const { url, ...res } = event;
this.params = {
url: decodeURIComponent(url),
res
};
if (event.title) {
uni.setNavigationBarTitle({
title: event.title
})
};
setTimeout(() => {
this.loading = false;
}, 1000);
},
}
</script>