3 Star 30 Fork 12

Carl/nuxt3-template

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
uno.config.ts 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
Carl 提交于 3小时前 . v3.17.3
import {
defineConfig,
presetAttributify,
presetIcons,
presetTypography,
presetWebFonts,
presetWind3,
transformerDirectives,
transformerVariantGroup,
} from 'unocss'
import { FileSystemIconLoader } from 'unplugin-icons/loaders'
export default defineConfig({
shortcuts: [
// ...
],
theme: {
colors: {
// ...
},
},
presets: [
presetWind3(),
presetAttributify({
ignoreAttributes: ['color', 'boder', 'size', 'align'],
}),
presetIcons({
warn: true, // 如果图标名称无效,是否给出警告
prefix: ['usvg-'], // 图标名称前缀,例如 i-home
extraProperties: {
'display': 'inline-block',
'vertical-align': 'middle',
'width': '1em',
'height': '1em',
},
collections: {
custom: FileSystemIconLoader('./assets/svgs', svg => svg.replace(/(<svg.*?fill=)"(.*?)"/, '$1"currentColor"')),
// , svg => svg.replace(/(<svg.*?fill=)"(.*?)"/, '$1"currentColor"')
// replace(/(<svg.*?fill=)"(.*?)"/, '$1"currentColor"')
// 使用 em 单位才能实现通过修改字体大小
},
}),
presetTypography(),
presetWebFonts({
fonts: {
// ...
},
}),
],
transformers: [
transformerDirectives({ enforce: 'pre' }),
transformerVariantGroup(),
],
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/webMa/nuxt3-template.git
git@gitee.com:webMa/nuxt3-template.git
webMa
nuxt3-template
nuxt3-template
master

搜索帮助