<template>
<web-view :src="src" :update-title="updateTitle"></web-view>
</template>
<script>
export default {
data() {
return {
src: '',
updateTitle: true
}
},
onLoad(options : OnLoadOptions) {
if (typeof options['url'] === 'string' && options['url']!.length > 0) {
const src = decodeURIComponent(options['url'] as string)
if (src != null) {
this.src = src
}
}
if (typeof options['title'] === 'string' && options['title']!.length > 0) {
this.updateTitle = false;
uni.setNavigationBarTitle({
title: options['title']!
});
}
}
}
</script>
<style>
</style>