fix: tailwindcss lint

This commit is contained in:
xingyu4j
2026-04-10 21:13:04 +08:00
parent 320e687bad
commit ee95548340
3 changed files with 8 additions and 7 deletions

View File

@@ -17,7 +17,8 @@ const contentMinHeight = computed(() =>
);
const previewClass = computed(() =>
cn(
'vben-tiptap-content bg-transparent p-0 leading-7 text-foreground',
'vben-tiptap-content',
'text-foreground bg-transparent p-0 leading-7',
props.class,
),
);

View File

@@ -41,7 +41,7 @@ const contentMinHeight = computed(() =>
);
const tiptapContentClass = cn(
'vben-tiptap-content vben-tiptap__content',
'min-h-(--vben-tiptap-min-height) leading-7 text-foreground outline-none',
'text-foreground min-h-(--vben-tiptap-min-height) leading-7 outline-none',
);
const editor = useEditor({
content: modelValue.value,

View File

@@ -128,18 +128,18 @@ export function useTiptapToolbar(options: UseTiptapToolbarOptions) {
function getToolbarButtonClass(action: ToolbarAction) {
return cn(
'relative rounded-[10px] border border-transparent bg-transparent text-muted-foreground shadow-none',
'text-muted-foreground relative rounded-[10px] border border-transparent bg-transparent shadow-none',
'transition-[transform,color,background-color,border-color,box-shadow] duration-200 ease-out',
'enabled:hover:-translate-y-px enabled:hover:border-border disabled:opacity-45',
'enabled:hover:border-border enabled:hover:-translate-y-px disabled:opacity-45',
'enabled:hover:bg-accent enabled:hover:text-foreground',
isActionActive(action) &&
'border-primary/30 bg-accent text-primary shadow-primary',
'bg-accent border-primary/30 shadow-primary text-primary',
);
}
function getPaletteSwatchClass(action: ToolbarAction, color: string) {
return cn(
'inline-flex size-8 items-center justify-center rounded-full border border-border',
'border-border inline-flex size-8 items-center justify-center rounded-full border',
'shadow-accent',
'transition-[transform,box-shadow,border-color] duration-200 ease-out',
'hover:-translate-y-px hover:scale-[1.04]',
@@ -154,7 +154,7 @@ export function useTiptapToolbar(options: UseTiptapToolbarOptions) {
'disabled:cursor-not-allowed disabled:opacity-45',
isMenuItemActive(item)
? 'bg-accent text-foreground'
: 'text-muted-foreground hover:bg-accent hover:text-foreground',
: 'hover:bg-accent hover:text-foreground text-muted-foreground',
);
}