[jira] [Created] (WEEX-237) SDK加载带有重定向的URL时,weex.config.bundleUrl所记录的URL依然是重定向前的URL

2018-03-05 Thread JIRA
胡广宇 created WEEX-237:


 Summary: SDK加载带有重定向的URL时,weex.config.bundleUrl所记录的URL依然是重定向前的URL
 Key: WEEX-237
 URL: https://issues.apache.org/jira/browse/WEEX-237
 Project: Weex
  Issue Type: Improvement
Reporter: 胡广宇
Assignee: Adam Feng


Native端的SDK在加载带有重定向的URL时,weex.config.bundleUrl所记录的URL依然是重定向前的URL



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: How to set z-index in App ?

2018-03-05 Thread Adam Feng
At present z-index is hard to implement because the compositing and event 
mechanism which we can’t change on native platform also need to be changed to 
response to the feature,  we have some ideas to  draw some basic components 
using openGL,  thus some css properties such as z-index, overflow, border can 
be implemented more easily.

Thanks.
Adam Feng

On 6 Mar 2018, 10:58 AM +0800, Hanks Zhang , wrote:
> +1. I also think this feature should be considered seriously, the feature
> request has been proposed for a long time.
>
> It needs the new layout engine to support it.
>
> Best Regards,
> Hanks
>
> 2018-03-06 0:00 GMT+08:00 莫克陶 :
>
> > z-index is important when making cool effect .
> >
> > This feature needs to be supported.
> >
> > https://segmentfault.com/q/101013513793?_ea=3401065
> >
> > http://dotwe.org/vue/e2ea54e6141a5b669efa5c5a75e9ab92
> >


[jira] [Created] (WEEX-236) 标签在Android上设置锚点会刷新

2018-03-05 Thread JIRA
胡广宇 created WEEX-236:


 Summary: 标签在Android上设置锚点会刷新
 Key: WEEX-236
 URL: https://issues.apache.org/jira/browse/WEEX-236
 Project: Weex
  Issue Type: Improvement
  Components: Android
Affects Versions: 0.12
Reporter: 胡广宇
Assignee: zhengshihan
 Fix For: 0.13


您好, 我在使用标签时,我通过在src中定义锚点来达到向所展示的html进行传值,和监听. 
但是发现设置锚点之后在Android上会刷新页面,而iOS上并不会刷新.
因此觉得这是一个issue~  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (WEEX-235) 标签在Android上设置锚点会刷新

2018-03-05 Thread JIRA
胡广宇 created WEEX-235:


 Summary: 标签在Android上设置锚点会刷新
 Key: WEEX-235
 URL: https://issues.apache.org/jira/browse/WEEX-235
 Project: Weex
  Issue Type: Improvement
  Components: Android
Affects Versions: 0.12
Reporter: 胡广宇
Assignee: zhengshihan
 Fix For: 0.13


您好, 我在使用标签时,我通过在src中定义锚点来达到向所展示的html进行传值,和监听. 
但是发现设置锚点之后在Android上会刷新页面,而iOS上并不会刷新.
因此觉得这是一个issue~  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-219) copy action for text component

2018-03-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387256#comment-16387256
 ] 

ASF GitHub Bot commented on WEEX-219:
-

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex/pull/1030


> copy action for text component
> --
>
> Key: WEEX-219
> URL: https://issues.apache.org/jira/browse/WEEX-219
> Project: Weex
>  Issue Type: Improvement
>  Components: iOS
>Reporter: xingZhang
>Assignee: xingZhang
>Priority: Major
>
> add copy action for text component
> you can specify an attribute disableCopy='true' to enable the copy action by 
> long press, default is disable.
>  
> try case :[ 
> http://dotwe.org/vue/77b7d735efaf55d6b84c5c8fb5196bd9|http://dotwe.org/vue/77b7d735efaf55d6b84c5c8fb5196bd9]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-218) support leftGap and rightGap for cell in waterfall component

2018-03-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16387252#comment-16387252
 ] 

ASF GitHub Bot commented on WEEX-218:
-

Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex/pull/1029


> support leftGap and rightGap for cell in waterfall component 
> -
>
> Key: WEEX-218
> URL: https://issues.apache.org/jira/browse/WEEX-218
> Project: Weex
>  Issue Type: Improvement
>Reporter: xingZhang
>Assignee: xingZhang
>Priority: Major
>
> support leftGap and rightGap attributes for cell in waterfall component 
> try case: [http://dotwe.org/vue/16ca2c8a9b0d7298f67bc0e7a1314c15]
>   [http://dotwe.org/vue/76712cdd7c3cf665717397b51ee1c60c] 
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


Re: How to set z-index in App ?

2018-03-05 Thread Hanks Zhang
+1. I also think this feature should be considered seriously, the feature
request has been proposed for a long time.

It needs the new layout engine to support it.

Best Regards,
Hanks

2018-03-06 0:00 GMT+08:00 莫克陶 :

> z-index is important when making cool effect .
>
> This feature needs to be supported.
>
> https://segmentfault.com/q/101013513793?_ea=3401065
>
> http://dotwe.org/vue/e2ea54e6141a5b669efa5c5a75e9ab92
>


How to set z-index in App ?

2018-03-05 Thread 莫克陶
z-index is important when making cool effect .

This feature needs to be supported.

https://segmentfault.com/q/101013513793?_ea=3401065

http://dotwe.org/vue/e2ea54e6141a5b669efa5c5a75e9ab92


[jira] [Created] (WEEX-234) weex自定义vue组件出现的异常

2018-03-05 Thread lzq920 (JIRA)
lzq920 created WEEX-234:
---

 Summary: weex自定义vue组件出现的异常
 Key: WEEX-234
 URL: https://issues.apache.org/jira/browse/WEEX-234
 Project: Weex
  Issue Type: Bug
  Components: JSFM
Affects Versions: 0.18
 Environment: weex SDK 0.18.0
Js Framework 0.24.4
platform ios
osversion 11.3
devicemodel iphone8,4 
Reporter: lzq920
Assignee: Adam Feng
 Fix For: 0.18
 Attachments: IMG_0002.PNG

使用vue自定义组件的方式写一个组件,在web端表现正常,在ios和Android表现异常。

具体表现为:iOS端和Android端无法渲染

[dotwe链接|http://dotwe.org/vue/119f74ba091d46b9959faffc9c2a187d]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-233) More enhanced about component

2018-03-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16386000#comment-16386000
 ] 

ASF GitHub Bot commented on WEEX-233:
-

Github user weex-bot commented on the issue:

https://github.com/apache/incubator-weex/pull/1047
  






  

  
  Messages

  
  
  :book:
  has no jsfm file changed.

  

  :book:
  jsfm test finished.

  




  Generated by :no_entry_sign: http://github.com/danger/danger-js/";>dangerJS




> More enhanced about  component
> ---
>
> Key: WEEX-233
> URL: https://issues.apache.org/jira/browse/WEEX-233
> Project: Weex
>  Issue Type: Improvement
>  Components: iOS
>Reporter: TangWei
>Assignee: Adam Feng
>Priority: Major
>  Labels: features, newbie
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss 
> the enhancements about component, let it take over where we can't implement 
> through weex.
> h2. Target
> {{}} is used to display web content that specified by src attribute in 
> weex page,We also can use webview module to control WebView behavior such as 
> goBack, goForward and reload.
> But it's not enough in most businesses,I think a more enhanced web component 
> should have the following:
>  * Support to send messages from Weex to a html in component.
>  * Support to send messages from a html in component to Weex.
>  * Support to render html source.
> Previously, component was an island that only rendered a remote url, but 
> enabled it to communicate through the context native to the webView. Then I'm 
> going to describe the solution that I came up with.
> h2. My solution
> h3. Code
>  * Weex iOS:
>  ** 
> [https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
>  * Weex Vue Demo:
>  ** [http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
>  ** [Demo Bundle 
> JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bundle.wx]
>  ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]
> h3.  
> [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] && 
> [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
> |[!https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966|width=240!|https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966]|[!https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67|width=600!|https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67]|
> h3. Details
> h4. Support to send messages from Weex to a html in component.
>  * Native:
>  \{{- (void)postMessage:(NSDictionary *)data { NSDictionary *eventDict = @ { 
> @"data" : data }
> ; NSString *json = [WXUtility JSONString:eventDict]; NSString *code = 
> [NSString stringWithFormat:@"(function ()\\{document.dispatchEvent(new 
> MessageEvent('message', %@));}())",json]; [_jsContext evaluateScript:code]; } 
> }}
>  * How to use:
>  \{{// Weex const webview = weex.requireModule('webview'); 
> webview.postMessage(this.$refs.webview, {detail:"message"}); // Web 
> document.addEventListener('message',function(e)\{ console.log(e.data.detail) 
> },false) }}
> h4. Support to send messages from a html in component to Weex.
>  * Native:
>  {{_jsContext[@"postMessage"] = ^(JSValue *data){ [weakSelf 
> fireEvent:@"message" params:[data toDictionary]]; }; }}
>  * How to use:
>  \{{// Weex  // Web 
> window.postMessage(message, targetOrigin, false); }}
> h4. Support to render html source.
>  * Native:
>  {{[_webview loadHTMLString:_source baseURL:nil]; }}
>  * How to use:
>  
> Welcome to put forward any suggestion about the solution or other 
> requirements for the component, Thanks!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (WEEX-233) More enhanced about component

2018-03-05 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385999#comment-16385999
 ] 

ASF GitHub Bot commented on WEEX-233:
-

GitHub user tw93 opened a pull request:

https://github.com/apache/incubator-weex/pull/1047

[WEEX-233][iOS] More enhanced about  component

First of all, thank you for your contribution! 

Please makes sure that these checkboxes are checked before submitting your 
PR, thank you!



CheckList:

*isNewFeature* **:**

  * [ ] Update API docs for the component.
  * [ ] Update/Add demo to demonstrate new feature.
  * [ ] Update test scripts for the feature.
  * [ ] Add unit tests for the feature.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/tw93/incubator-weex ios-feature-enhanced-web

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-weex/pull/1047.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #1047


commit a052c9f934899b8a0f83ee3d5ff2ba5dc3b13c60
Author: Tw93 
Date:   2018-02-27T10:47:26Z

+ [ios] more enhanced about web

commit e33353a794ed56033305d40692d876fdc58736f9
Author: Tw93 
Date:   2018-03-01T09:07:42Z

+ [ios] change to postmessage

commit 900426be26bf5ec08d32304d003f691932f61180
Author: Tw93 
Date:   2018-03-05T11:39:28Z

+ [ios] Code Style Guidelines




> More enhanced about  component
> ---
>
> Key: WEEX-233
> URL: https://issues.apache.org/jira/browse/WEEX-233
> Project: Weex
>  Issue Type: Improvement
>  Components: iOS
>Reporter: TangWei
>Assignee: Adam Feng
>Priority: Major
>  Labels: features, newbie
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss 
> the enhancements about component, let it take over where we can't implement 
> through weex.
> h2. Target
> {{}} is used to display web content that specified by src attribute in 
> weex page,We also can use webview module to control WebView behavior such as 
> goBack, goForward and reload.
> But it's not enough in most businesses,I think a more enhanced web component 
> should have the following:
>  * Support to send messages from Weex to a html in component.
>  * Support to send messages from a html in component to Weex.
>  * Support to render html source.
> Previously, component was an island that only rendered a remote url, but 
> enabled it to communicate through the context native to the webView. Then I'm 
> going to describe the solution that I came up with.
> h2. My solution
> h3. Code
>  * Weex iOS:
>  ** 
> [https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
>  * Weex Vue Demo:
>  ** [http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
>  ** [Demo Bundle 
> JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bundle.wx]
>  ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]
> h3.  
> [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] && 
> [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
> |[!https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966|width=240!|https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966]|[!https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67|width=600!|https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67]|
> h3. Details
> h4. Support to send messages from Weex to a html in component.
>  * Native:
>  \{{- (void)postMessage:(NSDictionary *)data { NSDictionary *eventDict = @ { 
> @"data" : data }
> ; NSString *json = [WXUtility JSONString:eventDict]; NSString *code = 
> [NSString stringWithFormat:@"(function ()\\{document.dispatchEvent(new 
> MessageEvent('message', %@));}())",json]; [_jsContext evaluateScript:code]; } 
> }}
>  * How to use:
>  \{{// Weex const webview = weex.requireModule('webview'); 
> webview.postMessage(this.$refs.webview, {detail:"message"}); // Web 
> d

[jira] [Updated] (WEEX-233) More enhanced about component

2018-03-05 Thread TangWei (JIRA)

 [ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TangWei updated WEEX-233:
-
Description: 
Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss the 
enhancements about component, let it take over where we can't implement through 
weex.
h2. Target

{{}} is used to display web content that specified by src attribute in 
weex page,We also can use webview module to control WebView behavior such as 
goBack, goForward and reload.

But it's not enough in most businesses,I think a more enhanced web component 
should have the following:
 * Support to send messages from Weex to a html in component.
 * Support to send messages from a html in component to Weex.
 * Support to render html source.

Previously, component was an island that only rendered a remote url, but 
enabled it to communicate through the context native to the webView. Then I'm 
going to describe the solution that I came up with.
h2. My solution
h3. Code
 * Weex iOS:
 ** 
[https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
 * Weex Vue Demo:
 ** [http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
 ** [Demo Bundle 
JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bundle.wx]
 ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]

h3.  [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] 
&& [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
|[!https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966|width=240!|https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966]|[!https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67|width=600!|https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67]|
h3. Details
h4. Support to send messages from Weex to a html in component.
 * Native:
 \{{- (void)postMessage:(NSDictionary *)data { NSDictionary *eventDict = @ { 
@"data" : data }
; NSString *json = [WXUtility JSONString:eventDict]; NSString *code = [NSString 
stringWithFormat:@"(function ()\\{document.dispatchEvent(new 
MessageEvent('message', %@));}())",json]; [_jsContext evaluateScript:code]; } }}

 * How to use:
 \{{// Weex const webview = weex.requireModule('webview'); 
webview.postMessage(this.$refs.webview, {detail:"message"}); // Web 
document.addEventListener('message',function(e)\{ console.log(e.data.detail) 
},false) }}

h4. Support to send messages from a html in component to Weex.
 * Native:
 {{_jsContext[@"postMessage"] = ^(JSValue *data){ [weakSelf 
fireEvent:@"message" params:[data toDictionary]]; }; }}
 * How to use:
 \{{// Weex  // Web window.postMessage(message, 
targetOrigin, false); }}

h4. Support to render html source.
 * Native:
 {{[_webview loadHTMLString:_source baseURL:nil]; }}
 * How to use:
 

Welcome to put forward any suggestion about the solution or other requirements 
for the component, Thanks!

  was:
Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss the 
enhancements about component, let it take over where we can't implement through 
weex.
h2. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#target]Target

{{}} is used to display web content that specified by src attribute in 
weex page,We also can use webview module to control WebView behavior such as 
goBack, goForward and reload.

But it's not enough in most businesses,I think a more enhanced web component 
should have the following:
 * Support to send messages from Weex to a html in component.
 * Support to send messages from a html in component to Weex.
 * Support to render html source.

Previously, component was an island that only rendered a remote url, but 
enabled it to communicate through the context native to the webView. Then I'm 
going to describe the solution that I came up with.
h2. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#my-solution]My 
solution
h3. [|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#code]Code
 * Weex iOS:
 ** 
[https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
 * Weex Vue Demo:
 ** [http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
 ** [Demo Bundle 
JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bun

[jira] [Updated] (WEEX-233) More enhanced about component

2018-03-05 Thread TangWei (JIRA)

 [ 
https://issues.apache.org/jira/browse/WEEX-233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

TangWei updated WEEX-233:
-
Description: 
Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss the 
enhancements about component, let it take over where we can't implement through 
weex.
h2. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#target]Target

{{}} is used to display web content that specified by src attribute in 
weex page,We also can use webview module to control WebView behavior such as 
goBack, goForward and reload.

But it's not enough in most businesses,I think a more enhanced web component 
should have the following:
 * Support to send messages from Weex to a html in component.
 * Support to send messages from a html in component to Weex.
 * Support to render html source.

Previously, component was an island that only rendered a remote url, but 
enabled it to communicate through the context native to the webView. Then I'm 
going to describe the solution that I came up with.
h2. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#my-solution]My 
solution
h3. [|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#code]Code
 * Weex iOS:
 ** 
[https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
 * Weex Vue Demo:
 ** [http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
 ** [Demo Bundle 
JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bundle.wx]
 ** [Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]

h3. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#demo--theory] 
[Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] && 
[Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
|[!https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966|width=240!|https://camo.githubusercontent.com/4c7a7b69d686b8127a0bdc89962c1aceac912083/68747470733a2f2f67772e616c697061796f626a656374732e636f6d2f7a6f732f726d73706f7274616c2f7342665447616d657a78614243475073687958542e676966]|[!https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67|width=600!|https://camo.githubusercontent.com/b1ed3e13b070b8302c2cecb067346a8da051207c/68747470733a2f2f696d672e616c6963646e2e636f6d2f7466732f544231684568586278475942754e6a7930466e585858356c7058612d313837322d313230382e706e67]|
h3. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#details]Details
h4. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#support-to-send-messages-from-weex-to-a-html-in--component]Support
 to send messages from Weex to a html in component.
 * Native:
{{- (void)postMessage:(NSDictionary *)data \{ NSDictionary *eventDict = @{ 
@"data" : data }; NSString *json = [WXUtility JSONString:eventDict]; NSString 
*code = [NSString stringWithFormat:@"(function ()\{document.dispatchEvent(new 
MessageEvent('message', %@));}())",json]; [_jsContext evaluateScript:code]; } }}
 * How to use:
{{// Weex const webview = weex.requireModule('webview'); 
webview.postMessage(this.$refs.webview, \{detail:"message"}); // Web 
document.addEventListener('message',function(e)\{ console.log(e.data.detail) 
},false) }}

h4. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#support-to-send-messages-from-a-html-in--component-to-weex]Support
 to send messages from a html in component to Weex.
 * Native:
{{_jsContext[@"postMessage"] = ^(JSValue *data)\{ [weakSelf 
fireEvent:@"message" params:[data toDictionary]]; }; }}
 * How to use:
{{// Weex  // Web window.postMessage(message, 
targetOrigin, false); }}

h4. 
[|https://gist.github.com/tw93/fc9d9c403234495c2b74e480cfc11bc4#support-to-render-html-source]Support
 to render html source.
 * Native:
{{[_webview loadHTMLString:_source baseURL:nil]; }}
 * How to use:


Welcome to put forward any suggestion about the solution or other requirements 
for the component, Thanks!

  was:
Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss the 
enhancements about component, let it take over where we can't implement through 
weex.
 
h2. Target
 
{{}} is used to display web content that specified by src attribute in 
weex page,We also can use webview module to control WebView behavior such as 
goBack, goForward and reload.
 
But it's not enough in most businesses,I think a more enhanced web component 
should have the following:
  * 
Support to send messages from Weex to a html in component.
 * 
Support to send messages from a html in component to Weex.
 * 
Support to render html source.

 
Previously, component was an isla

[jira] [Created] (WEEX-233) More enhanced about component

2018-03-05 Thread TangWei (JIRA)
TangWei created WEEX-233:


 Summary: More enhanced about  component
 Key: WEEX-233
 URL: https://issues.apache.org/jira/browse/WEEX-233
 Project: Weex
  Issue Type: Improvement
  Components: iOS
Reporter: TangWei
Assignee: Adam Feng


Hi, I'm Tw93(侑夕) from [Fliggy|https://www.fliggy.com/], I'd like to discuss the 
enhancements about component, let it take over where we can't implement through 
weex.
 
h2. Target
 
{{}} is used to display web content that specified by src attribute in 
weex page,We also can use webview module to control WebView behavior such as 
goBack, goForward and reload.
 
But it's not enough in most businesses,I think a more enhanced web component 
should have the following:
  * 
Support to send messages from Weex to a html in component.
 * 
Support to send messages from a html in component to Weex.
 * 
Support to render html source.

 
Previously, component was an island that only rendered a remote url, but 
enabled it to communicate through the context native to the webView. Then I'm 
going to describe the solution that I came up with.
 
h2. My solution
 
h3. Code
 * 
Weex iOS:
 ** 
[https://github.com/tw93/incubator-weex/blob/ios-feature-enhanced-web/ios/sdk/WeexSDK/Sources/Component/WXWebComponent.m]
 * 
Weex Vue Demo:
 ** 
[http://dotwe.org/vue/8847473f8f596573dadb66a344edfce2]
 ** 
[Demo Bundle 
JS|http://dotwe.org/raw/dist/b1f6d242760945d4b674c4f5913a39e4.bundle.wx]
 ** 
[Web End|http://h5.m.taobao.com/trip/wx-detection-demo/web.html]

 
h3. [Demo|https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif] 
&& [Theory|https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png]
|!https://gw.alipayobjects.com/zos/rmsportal/sBfTGamezxaBCGPshyXT.gif|width=240!|!https://img.alicdn.com/tfs/TB1hEhXbxGYBuNjy0FnXXX5lpXa-1872-1208.png|width=600!|
 
h3. Details
 
h4. Support to send messages from Weex to a html in component.
  * 
Native:
 {{- (void)postMessage:(NSDictionary *)data \{ NSDictionary *eventDict = @{ 
@"data" : data }; NSString *json = [WXUtility JSONString:eventDict]; NSString 
*code = [NSString stringWithFormat:@"(function ()\{document.dispatchEvent(new 
MessageEvent('message', %@));}())",json]; [_jsContext evaluateScript:code]; }}}
 * 
How to use:
 {{// Weex const webview = weex.requireModule('webview'); 
webview.postMessage(this.$refs.webview, \{detail:"message"}); // Web 
document.addEventListener('message',function(e)\{ console.log(e.data.detail) 
},false)}}

 
h4. Support to send messages from a html in component to Weex.
  * 
Native:
 {{_jsContext[@"postMessage"] = ^(JSValue *data)\{ [weakSelf 
fireEvent:@"message" params:[data toDictionary]]; };}}

 
 * 
How to use:
 {{// Weex  // Web window.postMessage(message, 
targetOrigin, false);}}

 
h4. Support to render html source.
  * 
Native:
 {{[_webview loadHTMLString:_source baseURL:nil];}}

 
 * 
How to use:
 {{}}

 
Welcome to put forward any suggestion about the solution or other requirements 
for the component, Thanks!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[GitHub] incubator-weex-site pull request #86: Update extend-android.md

2018-03-05 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/incubator-weex-site/pull/86


---