You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by mo...@apache.org on 2019/06/20 04:04:13 UTC

[incubator-weex-site] branch master updated: Add console-log docs.

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

moshen 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 e72c347  Add console-log docs.
e72c347 is described below

commit e72c3472b29b90b131347a5c90bb09639bd4fd8d
Author: qianyuan.wqy <qi...@alibaba-inc.com>
AuthorDate: Thu Jun 20 12:04:02 2019 +0800

    Add console-log docs.
---
 docs/.vuepress/config.js             |  6 ++++--
 docs/docs/modules/console-log.md     | 19 +++++++++++++++++++
 docs/docs/styles/common-styles.md    |  2 +-
 docs/zh/docs/modules/console-log.md  | 18 ++++++++++++++++++
 docs/zh/docs/styles/common-styles.md |  2 +-
 5 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js
index 1f03ed6..63a7b49 100644
--- a/docs/.vuepress/config.js
+++ b/docs/.vuepress/config.js
@@ -149,7 +149,8 @@ module.exports = {
                 ['modules/storage', 'storage'],
                 ['modules/stream', 'stream'],
                 ['modules/webview', 'webview'],
-                ['modules/websockets', 'webSockets']
+                ['modules/websockets', 'webSockets'],
+                ['modules/console-log', 'console-log']
               ]
             },
             {
@@ -321,7 +322,8 @@ module.exports = {
                 ['modules/storage', 'storage'],
                 ['modules/stream', 'stream'],
                 ['modules/webview', 'webview'],
-                ['modules/websockets', 'webSockets']
+                ['modules/websockets', 'webSockets'],
+                ['modules/console-log', 'console-log']
               ]
             },
             {
diff --git a/docs/docs/modules/console-log.md b/docs/docs/modules/console-log.md
new file mode 100644
index 0000000..af43402
--- /dev/null
+++ b/docs/docs/modules/console-log.md
@@ -0,0 +1,19 @@
+# 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/styles/common-styles.md b/docs/docs/styles/common-styles.md
index abb2688..6f773d4 100644
--- a/docs/docs/styles/common-styles.md
+++ b/docs/docs/styles/common-styles.md
@@ -23,7 +23,7 @@ Weex only supports `box-sizing:border-box`, in which box size includes `content`
 
 ::: warning
 * On Android, Weex only supports `overflow:hidden`.
-* 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)
+* On iOS, Weex supports `overflow:hidden` and `overflow:visible` and by default, it is `overflow:visible`.
 :::
 
 The following code snippets shows the basic usage of box model
diff --git a/docs/zh/docs/modules/console-log.md b/docs/zh/docs/modules/console-log.md
new file mode 100644
index 0000000..95d8757
--- /dev/null
+++ b/docs/zh/docs/modules/console-log.md
@@ -0,0 +1,18 @@
+# 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/styles/common-styles.md b/docs/zh/docs/styles/common-styles.md
index 25a6838..edbcf0d 100644
--- a/docs/zh/docs/styles/common-styles.md
+++ b/docs/zh/docs/styles/common-styles.md
@@ -24,7 +24,7 @@ Weex 盒模型的 box-sizing 默认为 border-box,即盒子的宽高包含内
 
 ::: warning
 * 在 Android 平台,Weex 只支持 `overflow:hidden`。
-* 在 iOS 上,0.24版本及以前,Weex 与浏览器行为一致,`overflow` 默认是 `visible`。从 0.25 版本开始,默认改为 `hidden`。同时 `overflow` 样式在 iOS 上会被忽略。你需要使用 `ios-overflow` 样式名称来指定。可参考 [样例](http://editor.weex.io/vue/13268ebfd31d8a3ef28bb6d88fa461d3)
+* 在 iOS 上,Weex 支持 `overflow:hidden` 和 `overflow:visible`,默认是 `overflow:visible`。
 :::
 
 下面的例子显示了盒模型的基本用法