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

prop传值不能使用对象的属性传值 #277

Closed
QuincyX opened this issue Jul 24, 2017 · 5 comments
Closed

prop传值不能使用对象的属性传值 #277

QuincyX opened this issue Jul 24, 2017 · 5 comments

Comments

@QuincyX
Copy link

QuincyX commented Jul 24, 2017

<card title="testing" :img="img" :name="dName" :price="d.price" :align="d.left"></card>

components = {
      card: Card
    }
    data = {
      img: 'ttttttt',
      d: {
        img: 'imginfo',
        name: 'nameinfo',
        price: 'priceinfo',
        left: 'left'
      }
    }
    computed = {
      dName(){
        return this.d.name
      }
    }

prop直接传字符串,使用data里的变量传递字符串,使用computed的变量返回字符串,都没问题;
但是使用对象里的属性作为:prop的值不能正确显示

@Gcaufy
Copy link
Collaborator

Gcaufy commented Jul 25, 2017

props里暂时不支持对象的点操作。

@chenillen
Copy link
Contributor

这个 issue 没有解决嘛?

@flyfox11
Copy link

@Gcaufy 那啥时候才能支持呢,被wepy的组件给坑惨了

@milixie
Copy link

milixie commented Dec 28, 2018

都过了一年了,怎么还不支持,我的wepy版本是1.6

@chenillen
Copy link
Contributor

這個等2.0吧。

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

5 participants