You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@weex.apache.org by "Hanks Zhang (JIRA)" <ji...@apache.org> on 2018/06/01 06:37:00 UTC

[jira] [Commented] (WEEX-401) about param jsonInitData

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

Hanks Zhang commented on WEEX-401:
----------------------------------

As far as I can see, that "jsonInitData" will be passed to the corresponding pages. In Vue.js syntax, you can get that data in the root component, it will be extended to the "this" of the root component.

 

For example, if you passed a data like this:

{

  name: 'string',

  object: { array:  [1, 2, 3] }

}

 

You can access those data in the root component:

 

export default {

  mounted () {

    console.log(this.name) // string

    this.object.array.push(4)

  }

}

 

 

> about param jsonInitData
> ------------------------
>
>                 Key: WEEX-401
>                 URL: https://issues.apache.org/jira/browse/WEEX-401
>             Project: Weex
>          Issue Type: Improvement
>            Reporter: shanyong
>            Assignee: Adam Feng
>            Priority: Major
>
> when native renderpage we have put a param named  "jsoninitdata"
> mInstance.renderByUrl(
>  getPageName(),
>  url,
>  options,
>  jsonInitData,
>  WXRenderStrategy.APPEND_ASYNC);
>  
> how to get this param in weex



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