uniapp 嵌套H5頁面、靜態頁面


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>

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM