提交 62f84687 编写于 作者: V Vben

chore: add windi.config.ts

上级 8e5740e7
module.exports = {
mode: 'jit',
import colors from 'windicss/colors';
import { defineConfig } from 'vite-plugin-windicss';
import { primaryColor } from './build/config/themeConfig';
export default defineConfig({
darkMode: 'class',
plugins: [createEnterPlugin()],
purge: {
enable: process.env.NODE_ENV === 'production',
content: ['./index.html', './src/**/*.{vue,ts,tsx}'],
},
theme: {
extend: {
zIndex: {
'-1': '-1',
},
colors: {
primary: {
DEFAULT: '#0960bd',
// dark: primaryColorDark,
},
...colors,
primary: primaryColor,
},
screens: {
sm: '576px',
......@@ -26,13 +23,14 @@ module.exports = {
},
},
},
};
});
/**
* Used for animation when the element is displayed
* @param maxOutput The larger the maxOutput output, the larger the generated css volume
*/
function createEnterPlugin(maxOutput = 6) {
const createCss = (index, d = 'x') => {
function createEnterPlugin(maxOutput = 10) {
const createCss = (index: number, d = 'x') => {
const upd = d.toUpperCase();
return {
[`*> .enter-${d}:nth-child(${index})`]: {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册