Files
youlai-app/unocss.config.ts
T
Ray.Hao cb1a1e349f refactor: 组件就近迁移、操作菜单组件化并统一页面命名
- 组件文件统一 PascalCase 并就近迁入所属目录
- 操作菜单抽为 ActionSheet 组件,危险操作确认拆为 useConfirmAction
- 导航栏测量拆为 useNavbarMetrics 并收缩对外接口
- 页面方法按动词约定重命名,show 前缀与 handle 误用一并修正
- 通知与菜单接口类型改用字面量联合并修正取值注释
- 多行空壳注释收回单行
2026-10-16 16:50:56 +08:00

33 lines
1.1 KiB
TypeScript

import presetWeapp from "unocss-preset-weapp";
import { extractorAttributify, transformerClass } from "unocss-preset-weapp/transformer";
const { presetWeappAttributify, transformerAttributify } = extractorAttributify();
export default {
presets: [
// https://github.com/MellowCo/unocss-preset-weapp
presetWeapp(),
// attributify autocomplete
presetWeappAttributify(),
],
// 只保留实际复用的组合;语义色直接用 color-* 类,其余交给 presetWeapp 自带规则
// flex-* 系列固定 flex 方向并统一交叉轴居中,需要其他对齐时直接写工具类
shortcuts: [
{
"flex-center": "flex justify-center items-center",
"flex-start": "flex justify-start items-center",
"flex-end": "flex justify-end items-center",
"flex-between": "flex justify-between items-center",
},
],
transformers: [
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerAttributify
transformerAttributify(),
// https://github.com/MellowCo/unocss-preset-weapp/tree/main/src/transformer/transformerClass
transformerClass(),
],
};