文件
OmniCard/mpuniapp/pages/component/button/privacy-web-view.uvue

30 行
625 B
Plaintext

<template>
<web-view :src="src" :update-title="updateTitle"></web-view>
</template>
<script setup lang="uts">
const src = ref('')
const updateTitle = ref(true)
onLoad((options : OnLoadOptions) => {
if (typeof options['url'] === 'string' && options['url']!.length > 0) {
const srcValue = decodeURIComponent(options['url'] as string)
if (srcValue != null) {
src.value = srcValue
}
}
if (typeof options['title'] === 'string' && options['title']!.length > 0) {
updateTitle.value = false;
uni.setNavigationBarTitle({
title: options['title']!
});
}
})
</script>
<style>
</style>