1、嵌套H5頁面
將web-view的src指向對應的url
1 <template> 2 <web-view src="https://baidu.com"></web-view> 3 </template>
2、嵌套靜態頁面
將 web-view 的 src 指向靜態文件
1 <template> 2 <web-view src="../../static/test.html"></web-view> 3 </template>
test.html代碼:
1 <!DOCTYPE html> 2 <html lang="en"> 3 <head> 4 <meta charset="UTF-8"> 5 <meta http-equiv="X-UA-Compatible" content="IE=edge"> 6 <meta name="viewport" content="width=device-width, initial-scale=1.0"> 7 <title>嵌套靜態頁</title> 8 </head> 9 <body> 10 <h5>嵌套靜態頁</h5> 11 </body> 12 </html>