9433cfb9创建于 2025年12月31日历史提交
<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>