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

【vue】踩坑总结 #23

Open
Kelichao opened this issue Mar 8, 2017 · 0 comments
Open

【vue】踩坑总结 #23

Kelichao opened this issue Mar 8, 2017 · 0 comments

Comments

@Kelichao
Copy link
Owner

Kelichao commented Mar 8, 2017

  • 用npm下载的vue.js不全,直接用vue.min.js比较好

  • iscroll组件会导致VUE存在冲突导致,事件绑定失效,慎用。

  • v-if里面如果语法错误会导致空白不渲染
    <li class="u-info" v-if="(market == 2) && ()"> 导致不渲染,而且无提示

  • template模板里面的语句不可以用if,否则渲染会出现奇怪的问题,如果外层有template包裹,则内部统一都使用template + v-if 这个还有待确认,现在有些地方可以正常使用的

  • 组件中的模板只会有一个闭合的大标签,如果没有一个闭合的大标签存在,模板只渲染其中第一个dom

  • 在组件中 props: ["title", "stockName", "stockCode", "inputNum", "changedPrice"]不要用大写
    因为v-bind绑定属性的时候,属性名会被html转成小写,导致获取不到数据 v-bind:stock-name="stockName"

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

1 participant