windi.config.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { defineConfig } from 'windicss/helpers'
  2. // function range(size, startAt = 1) {
  3. // return Array.from(Array(size).keys()).map((i) => i + startAt)
  4. // }
  5. export default defineConfig({
  6. extract: {
  7. include: ['src/**/*.{vue,html,jsx,tsx}'],
  8. exclude: ['node_modules', '.git']
  9. },
  10. darkMode: 'class',
  11. attributify: false,
  12. theme: {
  13. extend: {
  14. backgroundColor: {
  15. // 暗黑背景色
  16. 'v-dark': 'var(--dark-bg-color)'
  17. }
  18. // screens: {
  19. // sm: '768px',
  20. // md: '992px',
  21. // lg: '1200px',
  22. // xl: '1920px'
  23. // }
  24. }
  25. // height: {
  26. // ...range(50).map((i) => `h-${i}px`)
  27. // },
  28. // margin: {
  29. // // ...range(50).map((i) => `mt-${i}px`),
  30. // // ...range(50).map((i) => `mr-${i}px`),
  31. // // ...range(50).map((i) => `mb-${i}px`),
  32. // // ...range(50).map((i) => `ml-${i}px`)
  33. // }
  34. },
  35. Plugin: [
  36. require('@windicss/plugin-animations')({
  37. settings: {
  38. animatedSpeed: 1000,
  39. heartBeatSpeed: 1000,
  40. hingeSpeed: 2000,
  41. bounceInSpeed: 750,
  42. bounceOutSpeed: 750,
  43. animationDelaySpeed: 1000
  44. }
  45. })
  46. ]
  47. })