1 Star 0 Fork 0

shenmk/web-start-vue

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
uno.config.ts 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
jic999 提交于 2023-09-20 23:11 . merge: merge and add some changes
import {
defineConfig,
presetAttributify,
presetIcons,
presetUno,
transformerAttributifyJsx,
transformerDirectives,
} from 'unocss'
import { presetScalpel } from 'unocss-preset-scalpel'
import { FileSystemIconLoader } from '@iconify/utils/lib/loader/node-loaders'
export default defineConfig({
shortcuts: {
'flex-center': 'flex justify-center items-center',
'btn': 'px-4 py-1 rounded inline-block bg-$primary-c text-white cursor-pointer hover:bg-$primary-light-c active:bg-$primary-dark-c disabled:cursor-default disabled:bg-gray-600 disabled:opacity-50 transition-300 duration-200',
'icon-btn': 'text-16 inline-block cursor-pointer select-none opacity-75 transition duration-200 ease-in-out hover:opacity-100 hover:text-$primary-c',
},
rules: [
[
/^ellipsis-(\d+)$/,
([, n]) => ({
'overflow': 'hidden',
'text-overflow': 'ellipsis',
'display': ' -webkit-box',
'-webkit-line-clamp': `${n}`,
'-webkit-box-orient': 'vertical',
}),
],
],
presets: [
presetUno(),
presetAttributify(),
presetIcons({
scale: 1.2,
collections: {
cus: FileSystemIconLoader('./public/svg'),
},
}),
presetScalpel(),
],
transformers: [
transformerDirectives(),
transformerAttributifyJsx(),
],
})
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shenmk/web-start-vue.git
git@gitee.com:shenmk/web-start-vue.git
shenmk
web-start-vue
web-start-vue
main

搜索帮助

D67c1975 1850385 1daf7b77 1850385