Vue3 使用 ref 和 function 创建带圆角和蓝色背景的 div
<template>
<div :style="{backgroundColor: divBgColor.value, borderRadius: '30px', height: '100%'} "></div>
</template>
<script setup>
import { ref } from 'vue'
const divBgColor = ref('blue')
</script>
原文地址: https://www.cveoy.top/t/topic/mCYk 著作权归作者所有。请勿转载和采集!