Open
Description
Version
System:
OS: Windows 10 10.0.19045
CPU: (12) x64 12th Gen Intel(R) Core(TM) i5-12400
Memory: 2.23 GB / 15.75 GB
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.3636
npmPackages:
@rsbuild/core: ^1.0.1 => 1.0.8
@rsbuild/plugin-vue: ^1.0.1 => 1.0.1
Details
<template>
<div class="content" @click="color = !color">
<h1>Rsbuild with Vue</h1>
<p>Start building amazing things with Rsbuild.</p>
</div>
</template>
<script setup lang="ts">
import { ref } from 'vue'
const color = ref(true)
</script>
<style scoped>
content h1 {
font-size: 3.6rem;
font-weight: 700;
/* ok */
color: v-bind("color ? 'red': 'green'");
/* no ok */
color: v-bind('color ? "red": "green"');
}
</style>
// mian css
/* ok */
color: v-bind("color ? 'red': 'green'");
/* no ok */
color: v-bind('color ? "red": "green"');
Reproduce Steps
yarn dev