feat: 标题样式跟随主题,设置文本颜色会覆盖主题的标题颜色 #96

This commit is contained in:
log1997
2025-12-16 16:00:07 +08:00
parent 6e79a45aeb
commit ef9fc67f48
4 changed files with 40 additions and 32 deletions

View File

@@ -1,25 +1,29 @@
<script setup lang='ts'>
import { ref } from 'vue'
import { Switch } from '@/components/ui/switch'
const checked = ref(true)
</script>
<template>
<fieldset class="fieldset bg-base-100 border-base-300 rounded-box w-64 border p-4">
<legend class="fieldset-legend">
Login options
</legend>
<label class="label">
<input type="checkbox" :checked="checked" class="toggle border">
Remember me
</label>
</fieldset>
<div>
<Switch class="cursor-pointer" />
<h2 class="text-3xl animate-pulse bg-linear-to-r from-primary via-secondary to-accent bg-clip-text text-transparent">
两京一十三省
</h2>
<h2>两京一十三省</h2>
<h2>两京一十三省</h2>
<h2>两京一十三省</h2>
<h2>两京一十三省</h2>
<h2>两京一十三省</h2>
<h2>两京一十三省</h2>
</div>
</template>
<style lang='scss' scoped>
.dark-title {
color: red;
}
</style>