You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2019/05/29 12:24:54 UTC

[incubator-weex-site] branch master updated: Update web.md

This is an automated email from the ASF dual-hosted git repository.

zshshr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex-site.git


The following commit(s) were added to refs/heads/master by this push:
     new c7b7351  Update web.md
c7b7351 is described below

commit c7b73519ddabc7993276a63e3b2d0b5bf22a60e5
Author: zshshr <zh...@gmail.com>
AuthorDate: Wed May 29 20:24:50 2019 +0800

    Update web.md
---
 docs/docs/components/web.md | 33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

diff --git a/docs/docs/components/web.md b/docs/docs/components/web.md
index ba50345..a39dac8 100644
--- a/docs/docs/components/web.md
+++ b/docs/docs/components/web.md
@@ -4,6 +4,33 @@
 
 `<web>` is used to display web content that specified by `src` attribute in weex page. You also can use `webview` module to control WebView behavior such as goBack, goForward and reload, See [webview module](../modules/webview.html) for more information.
 
+`<web>` is used to display the content of the web page specified by the src attribute in the WEEX page.
+
+<div style="text-align: center"><img src="https://img.alicdn.com/tfs/TB161pxoiLaK1RjSZFxXXamPFXa-1465-758.png" width="850"></div>
+
+`<web>` can combine H5 with Native elements.
+
+* Figure 1: You can spread the entire page to the web page (fast compatibility with your previous H5 page)
+* Figure 2: You can synthesize complex pages using the Web and other Weex components
+* Figure 3: Using the Web to combine multiple effects (Set H5 page with transparent background, flexible configuration of various H5 activity information)
+
+```vue
+<template>
+  <web src="https://www.taobao.com/"></web>
+</template>
+<script></script>
+
+<style></style>
+```
+
+::: warning Note
+* `<web>` does not support list, scroller, and slider components in the same direction nested scroll mode, which will cause scrolling conflicts;
+* `<web>` does not support any nested subcomponents;
+* `<web>` must specify style attributes for width and height, otherwise it will not work;
+* You can use [webview module](../modules/webview.html) to control `<web>`;
+* `<web>` is only used as a degraded unconventional scenario and is not recommended for a large number of normal Weex pages.
+
+:::
 ## Basic Usage
 
 > **Note:** `<web>` does not support any nested child components, and must specific `width` and `height` in style attribute, otherwise it won't work.
@@ -16,11 +43,7 @@ See the [example](http://dotwe.org/vue/81da1f0129dfc72e1666cfd4b90f20ae).
 
 ## Attributes
 
-| Attribute | Type   | Value | Default Value |
-| --------- | ------ | ----- | ------------- |
-| `src`     | String | {URL} | -             |
-
-### `src`
+### **src**
 
 A URL value for web content to be loaded. You can specify a URL which is relative to bundle URL, it will be rewritten to the real resource URL (local or remote). See also: [Path](../../guide/advanced/asset-path.html).