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

key值相关修改及优化;shopcart组件代码优化 #60

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

key值相关修改及优化;shopcart组件代码优化 #60

wants to merge 3 commits into from

Conversation

jianmo-lc
Copy link

  1. 每一个使用v-for指令的元素都应该有一个key属性,且属性值不能相同,故对所有使用v-for指令的元素添加key属性,并绑定v-bind指令,从循环项中取值,保证唯一性。
  2. shopcart的支付按钮背景色由totalPrice和minPrice的大小关系决定,totalPrice小于minPrice则使用默认色,反之通过添加enough类的方法即可达到修改颜色的目的,无需添加计算属性。该修改方案减少了一个类名和一个计算属性,逻辑关系也会更加清晰。

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

Successfully merging this pull request may close these issues.

1 participant