Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

promise回调中双向绑定报错 #77

Closed
bajiu opened this issue Feb 26, 2018 · 2 comments
Closed

promise回调中双向绑定报错 #77

bajiu opened this issue Feb 26, 2018 · 2 comments

Comments

@bajiu
Copy link

bajiu commented Feb 26, 2018

eros 封装的promise里面可以获取到数值但是无法给this赋值回报错,只有在promise里这样,

<template lang="html">
  <div>
    {{card}}
  </div>
</template>

<script>
export default {
  data() {
    return {
      card: {}
    }
  },
  created() {
    this.$storage.get('contentPage').then(resData => {
      this.card = resData;
      console.log(resData)
    })
    this.$router.getParams().then(resData => {
      this.card = resData.card;
    })

  }
}

会报下面的错
jsLog: TypeError: null is not an object (evaluating 'e.parentNode.setAttr')

@bajiu bajiu changed the title 标签不对称导致双向绑定报错 promise回调中双向绑定报错 Feb 26, 2018
@bajiu
Copy link
Author

bajiu commented Feb 26, 2018

用text标签替换div就能解决,在weex中,双向绑定是需要绑定在特定标签中的

@PerseveranceZ
Copy link
Member

@bajiu thanks~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants