diff --git a/hybrid/html/local.html b/hybrid/html/local.html new file mode 100644 index 0000000000000000000000000000000000000000..e379a6d44658c688a049119eeb4c80383a0ded58 --- /dev/null +++ b/hybrid/html/local.html @@ -0,0 +1,112 @@ + + + + + + 本地网页 + + + +

web-view 组件加载本地 html 示例,仅在 App 环境下生效。点击下列按钮,跳转至其它页面。

+
+ + + + + +
+

网页向应用发送消息。注意:小程序端应用会在此页面后退时接收到消息。

+
+ +
+ + + + + \ No newline at end of file diff --git a/pages.json b/pages.json index 82728a34d881c203dbc3b6e6f770344bc7aad040..09e9b58265a7f4f0cfb8571607ab0e587a9b99e9 100644 --- a/pages.json +++ b/pages.json @@ -78,6 +78,18 @@ "navigationBarTitleText": "image" } }, + { + "path": "pages/component/web-view/web-view", + "style": { + "navigationBarTitleText": "web-view" + } + }, + { + "path": "pages/component/web-view-local/web-view-local", + "style": { + "navigationBarTitleText": "web-view-local" + } + }, { "path": "pages/tabBar/API/API", "style": { diff --git a/pages/component/web-view-local/web-view-local.uvue b/pages/component/web-view-local/web-view-local.uvue new file mode 100644 index 0000000000000000000000000000000000000000..0309df1f37f1b031fbccd79b1b17f7de00a82567 --- /dev/null +++ b/pages/component/web-view-local/web-view-local.uvue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/pages/component/web-view/web-view.uvue b/pages/component/web-view/web-view.uvue new file mode 100644 index 0000000000000000000000000000000000000000..c041fd9421af23cf513333dbb9fe5c8bb6c21267 --- /dev/null +++ b/pages/component/web-view/web-view.uvue @@ -0,0 +1,99 @@ + + + + + \ No newline at end of file diff --git a/pages/tabBar/component/component.uvue b/pages/tabBar/component/component.uvue index b6589d59854e115bccfb25aeca25da159c723cf0..e0a90b7edfaac512f463e21f92e0ad4771e73610 100644 --- a/pages/tabBar/component/component.uvue +++ b/pages/tabBar/component/component.uvue @@ -190,12 +190,12 @@ pages: [ { name: '网络网页', - enable: false, + enable: true, url: '/pages/component/web-view/web-view' }, { name: '本地网页', - enable: false, + enable: true, url: '/pages/component/web-view-local/web-view-local' } ] as Page[]