tailwind.config.ts 818 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import type {Config} from 'tailwindcss'
  2. import {isMp, isQuickapp} from '@uni-helper/uni-env'
  3. import {basePreset, elementPlusPreset, miniprogramBasePreset} from 'tailwind-extensions'
  4. const presets: Config['presets'] = [basePreset]
  5. if (isMp || isQuickapp) {
  6. presets.push(
  7. miniprogramBasePreset,
  8. )
  9. }
  10. else {
  11. presets.push(elementPlusPreset())
  12. }
  13. const theme: Config['theme'] = {
  14. extend: {
  15. colors: {
  16. primary: '#4545E5',
  17. default: '#828282',
  18. disabled: '#D9D9D9',
  19. },
  20. backgroundColor: {
  21. regular: '#F5F6F7',
  22. },
  23. },
  24. boxShadow: {
  25. 'cell-group': '0px 4px 12px 0px rgba(0, 0, 0, 0.10)',
  26. },
  27. }
  28. if (isMp || isQuickapp)
  29. theme.screens = {}
  30. const config: Config = {
  31. content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  32. presets,
  33. theme,
  34. }
  35. export default config