unocss.config.ts 567 B

1234567891011121314151617181920
  1. import { defineConfig, presetAttributify, presetUno } from "unocss"
  2. export default defineConfig({
  3. /** 预设 */
  4. presets: [
  5. /** 属性化模式 & 无值的属性模式 */
  6. presetAttributify(),
  7. /** 默认预设 */
  8. presetUno()
  9. ],
  10. /** 自定义规则 */
  11. rules: [["uno-padding-20", { padding: "20px" }]],
  12. /** 自定义快捷方式 */
  13. shortcuts: {
  14. "uno-wh-full": "w-full h-full",
  15. "uno-flex-center": "flex justify-center items-center",
  16. "uno-flex-x-center": "flex justify-center",
  17. "uno-flex-y-center": "flex items-center"
  18. }
  19. })