webview.vue 332 B

123456789101112131415161718
  1. <!-- 网页加载 -->
  2. <template>
  3. <view>
  4. <web-view :src="url" />
  5. </view>
  6. </template>
  7. <script setup>
  8. import { onLoad } from '@dcloudio/uni-app';
  9. import { ref } from 'vue';
  10. const url = ref('');
  11. onLoad((options) => {
  12. url.value = decodeURIComponent(options.url);
  13. });
  14. </script>
  15. <style lang="scss" scoped></style>