vue3 v-bind

 v-bind 该同学已经从实验室毕业了

经过尤大大和团队的努力,<style> v-bind 已经从实验室毕业了。
我们可以使用这个属性了。爽歪歪!
我们可以在style中去使用变量。是不是感觉很牛逼呀!
现在我们用起来,第一次使用<style> v-bind
<template>
  <span> 有开始循环了-开端 </span>  
</template>
<script setup>
  import { reactive } from 'vue'
  const state = reactive({
    color: 'red'
  })
</script>
<style scoped>
  span {
    /* 使用v-bind绑定state中的变量 */
    color: v-bind('state.color');
  }  
</style>

标签