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

双花括号数据绑定失效 #18

Open
chouxiaozi1989 opened this issue Feb 28, 2020 · 6 comments
Open

双花括号数据绑定失效 #18

chouxiaozi1989 opened this issue Feb 28, 2020 · 6 comments

Comments

@chouxiaozi1989
Copy link

<div v-for="(row, index) in logs" :key="index" class="log-item"> <i-card :title="row" extra="extra"> <p slot="content">{{row}}</p> <p slot="footer">footer</p> </i-card> </div>
这样书写时,content中的绑定内容row无法显示,同时还发现在i-col组件中使用双花括号无法绑定数据:
<div v-for="(row, index) in cols" :key="index"> <i-col :span="row.span" i-class="col-class">{{row.content}}</i-col> </div>

@mrbcy
Copy link

mrbcy commented Mar 9, 2020

在简书查到一篇文章,这个问题好像是mpvue不能在双括号里面调用method中的方法有关。https://www.jianshu.com/p/579035fc9c18

@chouxiaozi1989
Copy link
Author

在简书查到一篇文章,这个问题好像是mpvue不能在双括号里面调用method中的方法有关。https://www.jianshu.com/p/579035fc9c18

我上面的写法,没用到函数啊,直接绑定的data里的数据

@mrbcy
Copy link

mrbcy commented Mar 9, 2020

好像确实也绑定不上去,只要用了v-for就有问题

@mrbcy
Copy link

mrbcy commented Mar 9, 2020

去翻了一下mpvue的官网,发现slot的坑很多的,找了一个临时的解决方案,你可以看看。Meituan-Dianping/mpvue#860 感觉mpvue也不更新了,可能要重写了,唉

@chouxiaozi1989
Copy link
Author

去翻了一下mpvue的官网,发现slot的坑很多的,找了一个临时的解决方案,你可以看看。Meituan-Dianping/mpvue#860 感觉mpvue也不更新了,可能要重写了,唉

我放弃这个了,改用了uni-app,这个项目似乎已经没人维护了

@mrbcy
Copy link

mrbcy commented Mar 11, 2020

我放弃这个了,改用了uni-app,这个项目似乎已经没人维护了

看起来很不错的样子,我也去学习一下,谢啦

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