Browse Source

chore: add presetAttributify to unocss

main
刘凯 1 year ago
parent
commit
121cf97230
  1. 6
      src/types/global.d.ts
  2. 3
      uno.config.ts

6
src/types/global.d.ts vendored

@ -1,5 +1,7 @@
import type { ComponentPublicInstance, ComponentRenderProxy, FunctionalComponent, VNode, VNodeChild, PropType as VuePropType } from 'vue'
import type { AttributifyAttributes } from '@unocss/preset-attributify'
declare global {
const __APP_INFO__: {
pkg: {
@ -92,3 +94,7 @@ declare global {
declare module 'vue' {
export type JSXComponent<Props = any> = { new (): ComponentPublicInstance<Props> } | FunctionalComponent<Props>
}
declare module '@vue/runtime-dom' {
interface HTMLAttributes extends AttributifyAttributes {}
}

3
uno.config.ts

@ -1,4 +1,4 @@
import { defineConfig, presetIcons, presetTypography, presetUno } from 'unocss'
import { defineConfig, presetAttributify, presetIcons, presetTypography, presetUno } from 'unocss'
import { getIcons } from './src/components/Icon/src/icons'
export default defineConfig({
@ -12,6 +12,7 @@ export default defineConfig({
'vertical-align': 'middle',
},
}),
presetAttributify(),
],
theme: {
colors: {