Merge branch 'master' of https://github.com/apache/incubator-weex-site
# Conflicts:
# docs/.vuepress/config.js
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 63a7b49..8bcada9 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -150,6 +150,7 @@
['modules/stream', 'stream'],
['modules/webview', 'webview'],
['modules/websockets', 'webSockets'],
+ ['modules/deviceInfo', 'deviceInfo']
['modules/console-log', 'console-log']
]
},
@@ -323,6 +324,7 @@
['modules/stream', 'stream'],
['modules/webview', 'webview'],
['modules/websockets', 'webSockets'],
+ ['modules/deviceInfo', 'deviceInfo']
['modules/console-log', 'console-log']
]
},
diff --git a/docs/docs/components/text.md b/docs/docs/components/text.md
index d4ec54a..8ef37db 100644
--- a/docs/docs/components/text.md
+++ b/docs/docs/components/text.md
@@ -54,7 +54,7 @@
### Custom Typeface <Badge text="v0.12+" type="warning"/>
-Text component supports loading custom fonts in `ttf` file formats.
+Text component supports loading custom fonts in `ttf` and `woff` file formats.
1. Create your font with unique `font-family` name.
2. Using [addRule](../modules/dom.html#addrule-type-contentobject) method of dom module to register your font.
3. Set `font-family:YourFontFamilyName` style for your text component.
diff --git a/docs/docs/components/video.md b/docs/docs/components/video.md
index 7917a2e..5f037b5 100644
--- a/docs/docs/components/video.md
+++ b/docs/docs/components/video.md
@@ -1,15 +1,14 @@
-# Summary
-::: danger
-You should consider `<video>` as demo purpose, and re-implement it your favourite video library.
-:::
+# <video>
+
+## Summary
The video component can be used to embed video content in a Weex page.
-# Child Components
+## Child Components
A `text` is the only valid type of child component.
-# Attributes
+## Attributes
* **src**, string. The URL of the video to embed.
* **play-status**, string. Valid options are 'play' | 'pause'. Use it to control video's play status. Default value is `pause`。
@@ -17,18 +16,18 @@
* **poster**, string, <Badge text="v0.18+ & iOS" type="warning"/>. Post image URL of this video if any.
* **controls**, string, <Badge text="v0.19+" type="warning"/>. If set to `nocontrols`, native video component will hide its play-back control panel.
-# Styles
+## Styles
* **common styles**. support [common styles](../styles/common-styles.html).
-# Events
+## Events
* **start** Triggered when playback state is Playing.
* **pause** Triggered when playback state is Paused.
* **finish** Triggered when playback state is Finished.
* **fail** Triggered when playback state is Failed.
-# Example
+## Example
```html
<template>
diff --git a/docs/docs/modules/console-log.md b/docs/docs/modules/console-log.md
deleted file mode 100644
index af43402..0000000
--- a/docs/docs/modules/console-log.md
+++ /dev/null
@@ -1,19 +0,0 @@
-# console-log
-
-Your App may shield all console logs. Which makes difficult for debugging problems.
-Console-log module is used to force redirect all Weex logs to console.
-
-# API
-
-## switchLogLevel
-
-#### switchLogLevel(level, callback)
-
-* **@level**, log level: off|error|warning|info|debug
-* **@callback**, Callback after successfully switched level.
-
-# Usage
-
-Scan to open page [Log Switch](http://editor.weex.io/vue/eb6d6b27563608112a655b63ade638f0) and select log level.
-
-On iOS, connect your device to Mac, open XCode->Window->Devices and Simulators,Open Console. Filter using "<Weex>".
\ No newline at end of file
diff --git a/docs/docs/modules/deviceInfo.md b/docs/docs/modules/deviceInfo.md
new file mode 100644
index 0000000..148eba4
--- /dev/null
+++ b/docs/docs/modules/deviceInfo.md
@@ -0,0 +1,33 @@
+# deviceInfo
+
+The `deviceInfo` module can be used to get and set properties about device in weex such as fullScreenHeight.The module is suggested when you create a full screen page.
+
+# API
+
+## enableFullScreenHeight
+
+Since the default screen height in weex may exclude the height of status bar on some full screen devices.`enableFullScreenHeight` can be used to make full screen pages on these devices.
+
+#### enableFullScreenHeight(callback,extend)
+
+* **@callback**, function,callback when complete.
+ * **`fullScreenHeight`**, string, the current full screen height.
+
+* **@extend**, optional parameters,please input {}.
+
+
+#### example
+
+```javascript
+ var deviceInfo = weex.requireModule('deviceInfo')
+ var modal = weex.requireModule('modal')
+ deviceInfo.enableFullScreenHeight(
+ function (e) {
+ modal.toast({
+ message:"full screen height:" + e.fullScreenHeight,
+ duration:1,
+ });
+
+},{});
+```
+[Demo](http://dotwe.org/vue/d164a5f38bc15713e345483ef09868ab)
diff --git a/docs/docs/modules/navigator.md b/docs/docs/modules/navigator.md
index 4e860e5..34e37b6 100644
--- a/docs/docs/modules/navigator.md
+++ b/docs/docs/modules/navigator.md
@@ -24,7 +24,7 @@
url: bundleUrl,
animated: "true"
}, event => {
- modal.toast({ message: 'callback: ' + event)
+ modal.toast({ message: 'callback: ' + event })
})
```
@@ -43,7 +43,7 @@
var navigator = weex.requireModule('navigator')
var modal = weex.requireModule('modal')
navigator.pop({ animated: "true"}, event => {
- modal.toast({ message: 'callback: ' + event)
+ modal.toast({ message: 'callback: ' + event })
})
```
diff --git a/docs/docs/modules/picker.md b/docs/docs/modules/picker.md
index 5fff7ab..5fc1c30 100644
--- a/docs/docs/modules/picker.md
+++ b/docs/docs/modules/picker.md
@@ -1,9 +1,5 @@
# picker
-::: danger
-`<picker>` is only supported on Android and iOS, and is not supported on web.
-:::
-
A series of stream api. It provides function: pick data, pick date, pick time
# API
diff --git a/docs/docs/styles/common-styles.md b/docs/docs/styles/common-styles.md
index 6f773d4..abb2688 100644
--- a/docs/docs/styles/common-styles.md
+++ b/docs/docs/styles/common-styles.md
@@ -23,7 +23,7 @@
::: warning
* On Android, Weex only supports `overflow:hidden`.
-* On iOS, Weex supports `overflow:hidden` and `overflow:visible` and by default, it is `overflow:visible`.
+* On iOS, before version 0.24, Weex behaves the same as browser, so overflow is visible by default. From 0.25, overflow on iOS is hidden by default. And `overflow` is ignored on iOS. You should use 'ios-overflow' to set overflow value on iOS. Please refer to this [Demo](http://editor.weex.io/vue/13268ebfd31d8a3ef28bb6d88fa461d3)
:::
The following code snippets shows the basic usage of box model
diff --git a/docs/guide/debug/integrate-devtool-to-android.md b/docs/guide/debug/integrate-devtool-to-android.md
index 48f5b9f..76e8012 100644
--- a/docs/guide/debug/integrate-devtool-to-android.md
+++ b/docs/guide/debug/integrate-devtool-to-android.md
@@ -15,7 +15,6 @@
| 0.18.0+ | 0.13.4-multicontext |
| 0.19.0+ | 0.18.68 |
| 0.20.3.0-beta | 0.20.3.0-beta |
-| 0.24.0+ | 0.24.2.4 |
## Integrate to Android
diff --git a/docs/guide/debug/integrate-devtool-to-ios.md b/docs/guide/debug/integrate-devtool-to-ios.md
index edd7321..4f67b1a 100644
--- a/docs/guide/debug/integrate-devtool-to-ios.md
+++ b/docs/guide/debug/integrate-devtool-to-ios.md
@@ -12,14 +12,13 @@
#### Version compatibility
-| WeexSDK | WXDevtool |
+| weex sdk | weex inspector |
|----------|----------------|
| 0.16.0+ | 0.15.3 |
| 0.17.0+ | 0.16.0 |
-| 0.18.0+ | 0.16.3+ |
+| 0.18.0+ | 0.16.3+ |
| 0.19.0+ | 0.17.2+ |
-| 0.20.0+ | 0.20.0+ |
-| 0.24.0+ | 0.24.0 |
+| 0.20.0+ | 0.20.0+ |
## Integrate to iOS
diff --git a/docs/guide/develop/integrate-to-android-app.md b/docs/guide/develop/integrate-to-android-app.md
index 5b19d46..f5a7281 100644
--- a/docs/guide/develop/integrate-to-android-app.md
+++ b/docs/guide/develop/integrate-to-android-app.md
@@ -17,7 +17,7 @@
- [JAVA Environment, jdk7+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
- [Android Studio](https://developer.android.com/training/basics/firstapp/)
-- [NDK r18](https://developer.android.com/ndk/)、[Cmake 3.9.0+](https://cmake.org/download/) (option: if you need compile the source ,ndk and cmake are required)
+- [NDK r16](https://developer.android.com/ndk/)、[Cmake 3.9.0+](https://cmake.org/download/) (option: if you need compile the source ,ndk and cmake are required)
## 1. Configure dependency
diff --git a/docs/zh/docs/components/text.md b/docs/zh/docs/components/text.md
index 55503d3..ab7086e 100644
--- a/docs/zh/docs/components/text.md
+++ b/docs/zh/docs/components/text.md
@@ -56,7 +56,7 @@
### 自定义字体 <Badge text="v0.12+" type="warning"/>
-文本组件支持 `ttf` 字体格式的自定义字体。
+文本组件支持 `ttf` 和 `woff` 字体格式的自定义字体。
1. 使用唯一的 `font-family` 名字创建字体文件。
2. 使用 Dom 模块的 [addRule](../modules/dom.html#addrule-type-contentobject) 方法注册字体。
3. 在文本中使用 `font-family:YourFontFamilyName` 样式指定字体。
@@ -84,4 +84,4 @@
## 示例
* [`<text>`的基本用法](http://dotwe.org/vue/7d2bf6e112ea26984fd5930663f092e0)
-
+
\ No newline at end of file
diff --git a/docs/zh/docs/components/video.md b/docs/zh/docs/components/video.md
index c1f03c7..15597cc 100644
--- a/docs/zh/docs/components/video.md
+++ b/docs/zh/docs/components/video.md
@@ -1,15 +1,14 @@
-# 简介
-::: danger
-Weex中内置的`<video>`组件一般只做demo用途,在你的App中,你应该用你喜欢的视频库重新实现video组件。
-:::
+# <video>
+
+## 简介
Video 组件用于在页面中嵌入视频内容。
-# 子组件
+## 子组件
`text` 是唯一合法的子组件。
-# 属性
+## 属性
* **src**, string. 内嵌的视频指向的URL。
* **play-status**, string. 可选值为 `play` | `pause`,用来控制视频的播放状态,`play` 或者 `pause`,默认值是 `pause`。
@@ -17,18 +16,18 @@
* **poster**, string, <Badge text="v0.18+ & iOS" type="warning"/>. 指定视频首图的图片链接。
* **controls**, string, <Badge text="v0.19+" type="warning"/>. 可选值为 `controls` | `nocontrols`,控制视频播放组件是否显示回放控制面板,默认会显示,当指定为 `nocontrols` 时不显示回放控制面板。
-# 样式
+## 样式
* **通用样式** 支持所有[通用样式](../styles/common-styles.html)。
-# 事件
+## 事件
* **start** 当 playback 的状态是 Playing 时触发。
* **pause** 当 playback 的状态是 Paused 时触发。
* **finish** 当 playback 的状态是 Finished 时触发。
* **fail** 当 playback 状态是 Failed 时触发。
-# 示例
+## 示例
```html
<template>
diff --git a/docs/zh/docs/modules/console-log.md b/docs/zh/docs/modules/console-log.md
deleted file mode 100644
index 95d8757..0000000
--- a/docs/zh/docs/modules/console-log.md
+++ /dev/null
@@ -1,18 +0,0 @@
-# console-log
-
-有些时候线上应用会屏蔽控制台日志,这对排查问题不是很方便。Console-log 模块用于强制将 Weex 日志输出到控制台。
-
-# API
-
-## switchLogLevel
-
-#### switchLogLevel(level, callback)
-
-* **@level**, 日志等级:off|error|warning|info|debug
-* **@callback**, 切换成功后的回调
-
-# 使用方法
-
-扫码打开页面 [Log Switch](http://editor.weex.io/vue/eb6d6b27563608112a655b63ade638f0) ,选择日志等级即可。
-
-在 iOS 平台,连接设备到 Mac,打开 XCode->Window->Devices and Simulators,Open Console。过滤“<Weex>”日志。
\ No newline at end of file
diff --git a/docs/zh/docs/modules/deviceInfo.md b/docs/zh/docs/modules/deviceInfo.md
new file mode 100644
index 0000000..1144b87
--- /dev/null
+++ b/docs/zh/docs/modules/deviceInfo.md
@@ -0,0 +1,30 @@
+# deviceInfo
+
+deviceInfo模块可用来获取设备的基本信息并进行设置,如fullScreenHeight(全面屏高度)。适配全面屏时建议使用该模块。
+
+# API
+
+## enableFullScreenHeight
+
+适配全面屏时,默认获取的屏幕高度可能不包含status bar的高度,此时建议使用enableFullScreenHeight开启全屏效果
+
+#### enableFullScreenHeight(callback,extend)
+
+* **@callback**, function,用户操作完成后的回调
+ * **`fullScreenHeight`**, string, 全屏高度
+
+* **@extend**, 可选参数 请传入{}
+
+```javascript
+ var deviceInfo = weex.requireModule('deviceInfo')
+ var modal = weex.requireModule('modal')
+ deviceInfo.enableFullScreenHeight(
+ function (e) {
+ modal.toast({
+ message:"full screen height:" + e.fullScreenHeight,
+ duration:1,
+ });
+
+},{});
+```
+[示例](http://dotwe.org/vue/d164a5f38bc15713e345483ef09868ab)
diff --git a/docs/zh/docs/modules/navigator.md b/docs/zh/docs/modules/navigator.md
index c933010..b9f84b9 100644
--- a/docs/zh/docs/modules/navigator.md
+++ b/docs/zh/docs/modules/navigator.md
@@ -21,7 +21,7 @@
url: 'http://dotwe.org/raw/dist/519962541fcf6acd911986357ad9c2ed.js',
animated: "true"
}, event => {
- console.log('callback: ', event)
+ console.log('callback: ', event })
})
```
@@ -40,7 +40,7 @@
navigator.pop({
animated: "true"
}, event => {
- console.log('callback: ', event)
+ console.log('callback: ', event })
})
```
::: warning 注意
diff --git a/docs/zh/docs/modules/picker.md b/docs/zh/docs/modules/picker.md
index 7a824b7..4142235 100644
--- a/docs/zh/docs/modules/picker.md
+++ b/docs/zh/docs/modules/picker.md
@@ -1,9 +1,5 @@
# picker
-::: danger
-`<picker>` 只支持 Android 和 iOS,不支持 Web.
-:::
-
以下为 picker 相关的 API,用于数据选择,日期选择,时间选择。( H5模块如需使用,请手动引入 [weex-picker组件](https://github.com/weexteam/weex-picker))。
# API
diff --git a/docs/zh/docs/styles/common-styles.md b/docs/zh/docs/styles/common-styles.md
index b4a9caa..25a6838 100644
--- a/docs/zh/docs/styles/common-styles.md
+++ b/docs/zh/docs/styles/common-styles.md
@@ -24,7 +24,7 @@
::: warning
* 在 Android 平台,Weex 只支持 `overflow:hidden`。
-* 在 iOS 上,Weex 支持 `overflow:hidden` 和 `overflow:visible`,默认是 `overflow:visible`。
+* 在 iOS 上,0.24版本及以前,Weex 与浏览器行为一致,`overflow` 默认是 `visible`。从 0.25 版本开始,默认改为 `hidden`。同时 `overflow` 样式在 iOS 上会被忽略。你需要使用 `ios-overflow` 样式名称来指定。可参考 [样例](http://editor.weex.io/vue/13268ebfd31d8a3ef28bb6d88fa461d3)
:::
下面的例子显示了盒模型的基本用法
@@ -75,7 +75,7 @@
#### border-width
`border-width`:设定边框宽度,非负值, 默认值 0,如果四个方向的边框宽度不同,可分别设置:
- * `border-width {length}`:非负值, 默认值 0
+ * `border-left-width {length}`:非负值, 默认值 0
* `border-left-width {length}`:非负值, 默认值 0
* `border-top-width {length}`:非负值, 默认值 0
* `border-right-width {length}`:非负值, 默认值 0
diff --git a/docs/zh/guide/debug/integrate-devtool-to-android.md b/docs/zh/guide/debug/integrate-devtool-to-android.md
index 50f4f47..a6cabb4 100644
--- a/docs/zh/guide/debug/integrate-devtool-to-android.md
+++ b/docs/zh/guide/debug/integrate-devtool-to-android.md
@@ -8,14 +8,13 @@
#### 版本兼容
-| WeexSDK | Weex Inspector |
+| weex sdk | weex inspector |
|----------|----------------|
| 0.16.0+ | 0.12.1 |
| 0.17.0+ | 0.13.2 |
| 0.18.0+ | 0.13.4-multicontext |
| 0.19.0+ | 0.18.68 |
| 0.20.3.0-beta | 0.20.3.0-beta |
-| 0.24.0+ | 0.24.2.4 |
## Android接入指南
diff --git a/docs/zh/guide/debug/integrate-devtool-to-ios.md b/docs/zh/guide/debug/integrate-devtool-to-ios.md
index 6352b5b..64294f9 100644
--- a/docs/zh/guide/debug/integrate-devtool-to-ios.md
+++ b/docs/zh/guide/debug/integrate-devtool-to-ios.md
@@ -12,14 +12,13 @@
#### 版本兼容
-| WeexSDK | WXDevtool |
+| weex sdk | weex inspector |
|----------|----------------|
| 0.16.0+ | 0.15.3 |
| 0.17.0+ | 0.16.0 |
-| 0.18.0+ | 0.16.3+ |
+| 0.18.0+ | 0.16.3+ |
| 0.19.0+ | 0.17.2+ |
-| 0.20.0+ | 0.20.0+ |
-| 0.24.0+ | 0.24.0 |
+| 0.20.0+ | 0.20.0+ |
## iOS接入指南
diff --git a/docs/zh/guide/develop/integrate-to-android-app.md b/docs/zh/guide/develop/integrate-to-android-app.md
index ebfc945..6c214aa 100644
--- a/docs/zh/guide/develop/integrate-to-android-app.md
+++ b/docs/zh/guide/develop/integrate-to-android-app.md
@@ -17,7 +17,7 @@
- [JAVA环境, jdk7+](https://www.oracle.com/technetwork/java/javase/downloads/index.html)
- [Android Studio](https://developer.android.com/training/basics/firstapp/)
-- [NDK r18](https://developer.android.com/ndk/)、[Cmake 3.9.0+](https://cmake.org/download/) (可选项:如果需要编译WEEX源码,需要NDK环境支持)
+- [NDK r16](https://developer.android.com/ndk/)、[Cmake 3.9.0+](https://cmake.org/download/) (可选项:如果需要编译WEEX源码,需要NDK环境支持)
## 1. 设置gradle依赖