tailwind.config.ts 715 B

123456789101112131415161718192021222324252627282930313233
  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. colors: {
  15. primary: '#4545E5',
  16. default: '#828282',
  17. },
  18. boxShadow: {
  19. 'cell-group': '0px 4px 12px 0px rgba(0, 0, 0, 0.10)',
  20. },
  21. }
  22. if (isMp || isQuickapp)
  23. theme.screens = {}
  24. const config: Config = {
  25. content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
  26. presets,
  27. theme,
  28. }
  29. export default config