You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

webview.vue 413B

12345678910111213141516171819
  1. <template>
  2. <web-view :src="state.url"></web-view>
  3. </template>
  4. <script setup lang="ts">
  5. import { reactive } from "vue";
  6. import { onLoad } from "@dcloudio/uni-app";
  7. const state = reactive({
  8. url: ''
  9. })
  10. onLoad((option : any) => {
  11. // 传入需要跳转的链接 使用web-view标签进行跳转
  12. const params = JSON.parse(decodeURIComponent(option.url))
  13. state.url = params
  14. })
  15. </script>
  16. <style>
  17. </style>