Template
1
0
mirror of https://github.com/un-pany/v3-admin-vite.git synced 2025-04-22 11:59:19 +08:00
v3-admin-vite/unocss.config.ts

21 lines
547 B
TypeScript
Raw Normal View History

2022-05-12 19:07:54 +08:00
import { defineConfig, presetAttributify, presetUno } from "unocss"
export default defineConfig({
2024-11-19 20:14:23 +08:00
// 预设
2022-05-12 19:07:54 +08:00
presets: [
2024-11-19 20:14:23 +08:00
// 属性化模式 & 无值的属性模式
2022-05-12 19:07:54 +08:00
presetAttributify(),
2024-11-19 20:14:23 +08:00
// 默认预设
2022-05-12 19:07:54 +08:00
presetUno()
],
2024-11-19 20:14:23 +08:00
// 自定义规则
rules: [["uno-padding-20", { padding: "20px" }]],
2024-11-19 20:14:23 +08:00
// 自定义快捷方式
2022-05-12 19:07:54 +08:00
shortcuts: {
"uno-wh-full": "w-full h-full",
"uno-flex-center": "flex justify-center items-center",
"uno-flex-x-center": "flex justify-center",
"uno-flex-y-center": "flex items-center"
2022-05-12 19:07:54 +08:00
}
})