| | |
| | | import { defineConfig } from 'vite-plugin-windicss'; |
| | | import { primaryColor } from './build/config/themeConfig'; |
| | | import { defineConfig } from 'vite-plugin-windicss' |
| | | import { primaryColor } from './build/config/themeConfig' |
| | | |
| | | export default defineConfig({ |
| | | darkMode: 'class', |
| | |
| | | }, |
| | | }, |
| | | }, |
| | | }); |
| | | }) |
| | | |
| | | /** |
| | | * Used for animation when the element is displayed |
| | |
| | | */ |
| | | function createEnterPlugin(maxOutput = 8) { |
| | | const createCss = (index: number, d = 'x') => { |
| | | const upd = d.toUpperCase(); |
| | | const upd = d.toUpperCase() |
| | | return { |
| | | [`*> .enter-${d}:nth-child(${index})`]: { |
| | | transform: `translate${upd}(50px)`, |
| | |
| | | 'animation-fill-mode': 'forwards', |
| | | 'animation-delay': `${(index * 1) / 10}s`, |
| | | }, |
| | | }; |
| | | }; |
| | | } |
| | | } |
| | | const handler = ({ addBase }) => { |
| | | const addRawCss = {}; |
| | | const addRawCss = {} |
| | | for (let index = 1; index < maxOutput; index++) { |
| | | Object.assign(addRawCss, { |
| | | ...createCss(index, 'x'), |
| | | ...createCss(index, 'y'), |
| | | }); |
| | | }) |
| | | } |
| | | addBase({ |
| | | ...addRawCss, |
| | |
| | | transform: 'translateY(0)', |
| | | }, |
| | | }, |
| | | }); |
| | | }; |
| | | return { handler }; |
| | | }) |
| | | } |
| | | return { handler } |
| | | } |