状态驱动的CSS
<template>
<h1>Hello Andy</h1>
</template>
<script setup>
const theme = {
color: "red",
};
</script>
<style scoped>
h1 {
color: v-bind("theme.color");
}
</style>
<template>
<h1>Hello Andy</h1>
</template>
<script setup>
const theme = {
color: "red",
};
</script>
<style scoped>
h1 {
color: v-bind("theme.color");
}
</style>