v-bind-css.uvue 359 字节
Newer Older
1 2 3 4 5 6 7 8 9 10
<template>
  <view>
    <view class="rect-bind"></view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
雪洛's avatar
雪洛 已提交
11 12
        classBindColor: "#008000",
        classBindHeight: "300rpx",
13 14 15 16 17 18 19
      }
    }
  }
</script>

<style scoped>
  .rect-bind {
雪洛's avatar
雪洛 已提交
20
    height: v-bind(classBindHeight);
21 22 23
    background-color: v-bind(classBindColor);
  }
</style>