uno.config.js 564 B

12345678910111213141516171819
  1. import { defineConfig, presetAttributify, presetIcons, presetUno } from 'unocss'
  2. import { presetScrollbar } from 'unocss-preset-scrollbar'
  3. export default defineConfig({
  4. shortcuts: {
  5. 'hc-flex': 'relative flex items-center',
  6. 'hc-flex-center': 'hc-flex justify-center',
  7. },
  8. presets: [
  9. presetUno(),
  10. presetIcons(),
  11. presetAttributify({
  12. prefix: 'hc-', //属性冲突的自定义前缀
  13. prefixedOnly: true, //强制使用前缀
  14. }),
  15. //滚动条
  16. presetScrollbar(),
  17. ],
  18. })