mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-01-23 17:50:25 +08:00
chore: add windi.config.ts
This commit is contained in:
parent
8e5740e715
commit
62f8468775
@ -1,21 +1,18 @@
|
||||
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})`]: {
|
Loading…
Reference in New Issue
Block a user