uno.config.js 831 B

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