跳至主要內容

v-vind 样式绑定指令


v-vind 样式绑定指令

v-bind Demo
<template>
  <div style="text-align: center;">
    <div>{{msg}}</div>
    <div v-bind:id="id1">{{msg}}</div>
  </div>
</template>
<script>
export default {
  data(){
      return{
          msg: "hello world",
          id1: "bindId"
      }
  },
};
</script>
<style>
#bindId {
  color: red;
}
</style>
上次编辑于:
贡献者: Neil