uno.config.js 726 B

123456789101112131415161718192021
  1. import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
  2. import { presetExtra } from 'unocss-preset-extra'
  3. export default defineConfig({
  4. shortcuts: {
  5. 'hc-flex': 'relative flex items-center',
  6. 'hc-flex-inline': 'relative inline-flex items-center',
  7. 'hc-flex-center': 'hc-flex justify-center',
  8. 'hc-flex-inline-center': 'hc-flex-inline justify-center',
  9. },
  10. presets: [
  11. presetUno(),
  12. presetIcons(),
  13. presetAttributify({
  14. prefix: 'hc-', //属性冲突的自定义前缀
  15. prefixedOnly: true, //强制使用前缀
  16. }),
  17. //其它扩展,主要用动画,集成了 animate.css
  18. presetExtra(),
  19. ],
  20. })