条件渲染、列表渲染、Class与Style绑定.

条件渲染:v-if v-else v-else-if,v-show

列表渲染:v-for <div v-for="item in list">

style和class 的绑定:style可写成对象形式,然后通过属性绑定v-bind进行绑定;class绑定写成对象形式,键名是真是的class名称,值为布尔值或表达式,或者可以使用数组直接输出字符串,也可以用对象表达式+数组混合的方式

Vue学习笔记(条件渲染、列表渲染、Class与Style绑定)

相关文章:

  • 2021-04-18
  • 2021-12-16
  • 2021-08-23
  • 2022-12-23
  • 2021-07-10
  • 2022-12-23
  • 2022-12-23
  • 2021-08-08
猜你喜欢
  • 2022-12-23
  • 2019-11-17
  • 2021-09-02
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2021-09-22
相关资源
相似解决方案