webview.vue 952 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <template>
  2. <view class="page"><web-view class="web-view" :src="url"></web-view></view>
  3. </template>
  4. <script>
  5. export default {
  6. data() {
  7. return {
  8. url: '',
  9. title: ''
  10. };
  11. },
  12. components: {},
  13. props: {},
  14. /**
  15. * 生命周期函数--监听页面加载
  16. */
  17. onLoad(options) {
  18. this.setData({
  19. url: options.url,
  20. title: options.nav
  21. });
  22. },
  23. /**
  24. * 生命周期函数--监听页面初次渲染完成
  25. */
  26. onReady() {},
  27. /**
  28. * 生命周期函数--监听页面显示
  29. */
  30. onShow() {},
  31. /**
  32. * 生命周期函数--监听页面隐藏
  33. */
  34. onHide() {},
  35. /**
  36. * 生命周期函数--监听页面卸载
  37. */
  38. onUnload() {},
  39. /**
  40. * 页面相关事件处理函数--监听用户下拉动作
  41. */
  42. onPullDownRefresh() {},
  43. /**
  44. * 页面上拉触底事件的处理函数
  45. */
  46. onReachBottom() {},
  47. /**
  48. * 用户点击右上角分享
  49. */
  50. onShareAppMessage() {},
  51. methods: {}
  52. };
  53. </script>
  54. <style>
  55. @import './webview.css';
  56. </style>