From a82f5d4624a76f5fdf68eb2fc09f8fb6ecdc8a56 Mon Sep 17 00:00:00 2001 From: feige996 <1020102647@qq.com> Date: Mon, 9 Jun 2025 17:19:30 +0800 Subject: [PATCH] =?UTF-8?q?docs(unocss):=20=E6=B7=BB=E5=8A=A0=E6=B3=A8?= =?UTF-8?q?=E9=87=8A=E8=AF=B4=E6=98=8E=E5=B9=B6=E9=85=8D=E7=BD=AEpresetUni?= =?UTF-8?q?=E7=9A=84attributify=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 添加关于@uni-helper/unocss-preset-uni的npm链接注释 配置presetUni的attributify选项,设置prefixedOnly为true --- uno.config.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/uno.config.ts b/uno.config.ts index 703d925..194b96a 100644 --- a/uno.config.ts +++ b/uno.config.ts @@ -1,3 +1,4 @@ +// https://www.npmjs.com/package/@uni-helper/unocss-preset-uni import { presetUni } from '@uni-helper/unocss-preset-uni' import { defineConfig, @@ -9,7 +10,12 @@ import { export default defineConfig({ presets: [ - presetUni(), + presetUni({ + attributify: { + // prefix: 'fg-', // 如果加前缀,则需要在代码里面使用 `fg-` 前缀,如:
+ prefixedOnly: true, + }, + }), presetIcons({ scale: 1.2, warn: true,