GitHub user kfeagle opened a pull request:

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

    + [ios] support call native directly

    
    user can call native function if user  realize the function 
WXExtendCallNativeProtocol
    demo
    ```
    
    <template>
      <div class="wrapper" @click="update">
        <image :src="logoUrl" class="logo"></image>
        <text class="title">Hello {{target}}</text>
      </div>
    </template>
    
    <style scoped>
      .wrapper {align-items: center; margin-top: 120px;}
      .title {font-size: 48px;}
      .logo {width: 360px; height: 82px;}
    </style>
    
    <script>
      var modal = weex.requireModule('modal')
      module.exports = {
        data: {
          logoUrl: 'https://alibaba.github.io/weex/img/weex_logo_b...@3x.png',
          target: 'World'
        },
        methods: {
          update: function (e) {
            this.target = 'Weex'
            console.log('target:', this.target)
            var dict = extendCallNative({
              'className':'test'
            })
            modal.toast({
              'message': dict['value'],
              'duration': 1000
            })
          }
        }
      }
    </script>
    ```

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

    $ git pull https://github.com/kfeagle/incubator-weex ios-native-0.16-dev

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

    https://github.com/apache/incubator-weex/pull/585.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 #585
    
----
commit b3e404937bafa77cee4544c97598c1c4ec6ef2ed
Author: 齐山 <sunjjb...@163.com>
Date:   2017-07-23T13:30:45Z

    + [ios] support extend call native for third part

commit 6225ed13d9ae3dda08c848abe3ba8f669037b296
Author: 齐山 <sunjjb...@163.com>
Date:   2017-07-27T04:16:51Z

    + [ios] add extend call native

commit 51009919269b7fecbe0da5adc832efbdcc1f5603
Author: 齐山 <sunjjb...@163.com>
Date:   2017-07-27T04:21:01Z

    Merge branch '0.16-dev' of 
https://git-wip-us.apache.org/repos/asf/incubator-weex into ios-native-0.16-dev
    
    # Conflicts:
    #   ios/playground/WeexDemo.xcodeproj/project.pbxproj
    #   ios/sdk/WeexSDK/Sources/Bridge/WXJSCoreBridge.m

commit 4d78365d0099bebd598351959ac0c4a0e0a30dc0
Author: 齐山 <sunjjb...@163.com>
Date:   2017-08-08T08:38:23Z

    + [ios] update native logic

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to