preset-attributify 不要用b

This commit is contained in:
2024-08-22 22:35:54 +08:00
parent 38e95fc615
commit 708819f1a7
2 changed files with 11 additions and 8 deletions

View File

@ -1,15 +1,19 @@
// https://unocss.dev/presets/attributify#vue-3
import type { BasicAttributes, PseudoPrefix } from '@unocss/preset-attributify';
// https://github.com/unocss/unocss/pull/4095
type BasicAttributesFix = BasicAttributes | 'b';
// type BasicAttributesFix = import('@unocss/preset-attributify').BasicAttributes | 'b';
type AttributifyNames<Prefix extends string = ''> =
| `${Prefix}${BasicAttributesFix}`
| `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
// type AttributifyNames<Prefix extends string = ''> =
// | `${Prefix}${BasicAttributesFix}`
// | `${Prefix}${PseudoPrefix}:${BasicAttributes}`;
// declare module '@vue/runtime-dom' {
// interface HTMLAttributes extends Partial<Record<AttributifyNames, string | boolean>> {}
// }
declare module '@vue/runtime-dom' {
interface HTMLAttributes extends Partial<Record<AttributifyNames, string | boolean>> {}
interface HTMLAttributes
extends Partial<Record<import('@unocss/preset-attributify').AttributifyNames, string | boolean>> {}
}
export {};