Commit 62f846877513b0eec2d0800d37f56e804c187572

Authored by Vben
1 parent 8e5740e7

chore: add windi.config.ts

tailwind.config.js renamed to windi.config.ts
1   -module.exports = {
2   - mode: 'jit',
  1 +import colors from 'windicss/colors';
  2 +import { defineConfig } from 'vite-plugin-windicss';
  3 +import { primaryColor } from './build/config/themeConfig';
  4 +
  5 +export default defineConfig({
3 6 darkMode: 'class',
4 7 plugins: [createEnterPlugin()],
5   - purge: {
6   - enable: process.env.NODE_ENV === 'production',
7   - content: ['./index.html', './src/**/*.{vue,ts,tsx}'],
8   - },
9 8 theme: {
10 9 extend: {
11 10 zIndex: {
12 11 '-1': '-1',
13 12 },
14 13 colors: {
15   - primary: {
16   - DEFAULT: '#0960bd',
17   - // dark: primaryColorDark,
18   - },
  14 + ...colors,
  15 + primary: primaryColor,
19 16 },
20 17 screens: {
21 18 sm: '576px',
... ... @@ -26,13 +23,14 @@ module.exports = {
26 23 },
27 24 },
28 25 },
29   -};
  26 +});
  27 +
30 28 /**
31 29 * Used for animation when the element is displayed
32 30 * @param maxOutput The larger the maxOutput output, the larger the generated css volume
33 31 */
34   -function createEnterPlugin(maxOutput = 6) {
35   - const createCss = (index, d = 'x') => {
  32 +function createEnterPlugin(maxOutput = 10) {
  33 + const createCss = (index: number, d = 'x') => {
36 34 const upd = d.toUpperCase();
37 35 return {
38 36 [`*> .enter-${d}:nth-child(${index})`]: {
... ...