代码拉取完成,页面将自动刷新
// 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,
],
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。