1 Star 1 Fork 1

fszaxt/read-book-uniapp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
uno.config.ts 1.29 KB
一键复制 编辑 原始数据 按行查看 历史
fszaxt 提交于 2023-12-15 17:01 . first commit
// uno.config.ts
import { defineConfig, presetIcons } from "unocss"
import presetWeapp from "unocss-preset-weapp"
import { transformerClass } from "unocss-preset-weapp/transformer"
const transformRules = {
".": "-d111-",
"/": "-s111-",
":": "-c111-",
"%": "-p111-",
"!": "-e111-",
"#": "-w111-",
"(": "-b111l-",
")": "-b111r-",
"[": "-f111l-",
"]": "-f111r-",
$: "-r111-",
",": "-r222-",
}
export default defineConfig({
// ...UnoCSS options
presets: [
presetIcons({
prefix: "",
extraProperties: {
display: "inline-block",
},
}),
// https://github.com/MellowCo/unocss-preset-weapp
presetWeapp({
transformRules,
whRpx: false,
}) as any,
],
rules: [["overflow-ellipsis", { "text-overflow": "ellipsis" }]],
shortcuts: {
"flex-center": "flex justify-center items-center",
"size-full": "w-full h-full",
},
layers: {
default: -1,
base: 0,
utilities: 1,
components: 2,
},
transformers: [
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
transformerClass({
transformRules,
}) as any,
],
})
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fszaxt/read-book-uniapp.git
git@gitee.com:fszaxt/read-book-uniapp.git
fszaxt
read-book-uniapp
read-book-uniapp
master

搜索帮助