style: 💄 删除shadcn-vue的样式预设,只使用daisyui的样式 #96

This commit is contained in:
log1997
2025-12-16 15:48:51 +08:00
parent 665cce7273
commit 6e79a45aeb
2 changed files with 12 additions and 11 deletions

View File

@@ -67,7 +67,7 @@ ul {
/* IE9+, News */ /* IE9+, News */
} }
@theme inline { /* @theme inline {
--radius-sm: calc(var(--radius) - 4px); --radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px); --radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius); --radius-lg: var(--radius);
@@ -103,9 +103,9 @@ ul {
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground); --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-border: var(--sidebar-border); --color-sidebar-border: var(--sidebar-border);
--color-sidebar-ring: var(--sidebar-ring); --color-sidebar-ring: var(--sidebar-ring);
} } */
:root { /* :root {
--radius: 0.625rem; --radius: 0.625rem;
--background: oklch(1 0 0); --background: oklch(1 0 0);
--foreground: oklch(0.145 0 0); --foreground: oklch(0.145 0 0);
@@ -173,8 +173,9 @@ ul {
--sidebar-border: oklch(1 0 0 / 10%); --sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.556 0 0); --sidebar-ring: oklch(0.556 0 0);
} }
*/
@layer base { /* @layer base {
* { * {
@apply border-border outline-ring/50; @apply border-border outline-ring/50;
} }
@@ -182,4 +183,4 @@ ul {
body { body {
@apply bg-background text-foreground; @apply bg-background text-foreground;
} }
} } */

View File

@@ -57,13 +57,13 @@ const disabledStyle = computed(() => {
<template> <template>
<div class="w-full h-full flex justify-center items-center max-w-xs" :style="disabledStyle"> <div class="w-full h-full flex justify-center items-center max-w-xs" :style="disabledStyle">
<Popover v-model:open="open"> <Popover v-model:open="open" class="w-full">
<PopoverTrigger as-child :disabled="browserDisabled || disabled"> <PopoverTrigger as-child :disabled="browserDisabled || disabled">
<Button <Button
variant="outline" variant="outline"
role="combobox" role="combobox"
:aria-expanded="open" :aria-expanded="open"
class="w-full justify-between truncate bg-transparent hover:bg-transparent hover:text-inherit" class="w-full justify-between truncate hover:bg-transparent hover:text-inherit"
@click="getFonts" @click="getFonts"
> >
<span class="w-7/8 text-left truncate" :style="{ fontFamily: `${selectedFont}` }"> <span class="w-7/8 text-left truncate" :style="{ fontFamily: `${selectedFont}` }">
@@ -72,7 +72,7 @@ const disabledStyle = computed(() => {
<ChevronsUpDownIcon class="opacity-50" /> <ChevronsUpDownIcon class="opacity-50" />
</Button> </Button>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent class="w-full p-0"> <PopoverContent class="w-full p-0 bg-base-100">
<Command> <Command>
<CommandInput class="h-9" placeholder="Search framework..." /> <CommandInput class="h-9" placeholder="Search framework..." />
<CommandList @scroll="handleScroll"> <CommandList @scroll="handleScroll">
@@ -82,7 +82,7 @@ const disabledStyle = computed(() => {
v-for="[key, value] in fonts" v-for="[key, value] in fonts"
:key="key" :key="key"
:value="key" :value="key"
class="w-full hover:bg-gray-200/50" class="w-full hover:bg-gray-200/60"
@select="selectFont(key)" @select="selectFont(key)"
> >
<Popover :open="debouncedActiveKey === key" class="w-full"> <Popover :open="debouncedActiveKey === key" class="w-full">
@@ -96,7 +96,7 @@ const disabledStyle = computed(() => {
/> />
</div> </div>
</PopoverTrigger> </PopoverTrigger>
<PopoverContent class="p-2" side="right" @mouseleave="handelActiveKey('')" @mouseenter="handelActiveKey(key)"> <PopoverContent class="p-2 bg-base-100" side="right" @mouseleave="handelActiveKey('')" @mouseenter="handelActiveKey(key)">
<PopoverArrow /> <PopoverArrow />
<Command> <Command>
<CommandGroup> <CommandGroup>
@@ -104,7 +104,7 @@ const disabledStyle = computed(() => {
v-for="child in value" v-for="child in value"
:key="child.value" :key="child.value"
:value="child.value" :value="child.value"
class="w-full hover:bg-gray-200/50" class="w-full hover:bg-gray-200/60"
:style="{ fontFamily: `${key}` }" :style="{ fontFamily: `${key}` }"
@select="selectFont(child.value)" @select="selectFont(child.value)"
> >