4 Star 14 Fork 1.4K

柒色刘/SCUI

forked from sakuya/SCUI 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
unocss.config.js 1.49 KB
一键复制 编辑 原始数据 按行查看 历史
柒色刘 提交于 2024-05-24 10:11 . 第一次-vite基础版提交
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
// presetUno,
presetWebFonts,
presetWind,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import epIcons from '@iconify-json/ep'
const iconPrefix = 'i-'
export default defineConfig({
shortcuts: [
],
variants: [
{
match: (s) => {
if (s.startsWith(iconPrefix)) {
return {
matcher: s,
selector: (s) => {
return s.startsWith('.') ? `${s.slice(1)},${s}` : s
},
}
}
},
},
],
presets: [
// presetUno(),
presetWind(),
presetAttributify(),
presetIcons({
scale: 1.2,
warn: true,
prefix: iconPrefix,
}),
presetTypography(),
presetWebFonts({
fonts: {
sans: 'DM Sans',
serif: 'DM Serif Display',
mono: 'DM Mono',
},
}),
],
transformers: [
transformerDirectives(),
transformerVariantGroup(),
],
safelist: [
...'prose prose-sm m-auto text-left'.split(' '),
...Object.keys(epIcons.icons.icons).map(name => `${iconPrefix}${epIcons.icons.prefix}-${name}`),
],
theme: {
colors: {
primary: 'var(--el-color-primary)',
},
},
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/qiseliu/scui.git
git@gitee.com:qiseliu/scui.git
qiseliu
scui
SCUI
vite

搜索帮助