eslint 10、eslint-plugin-vue 10、stylelint 17、commitlint 21 eslint 配置改为 flat config,去掉自动导入 globals 文件 环境变量改成 VITE_API_BASE 与 VITE_API_URL 函数注释改成多行 JSDoc,去掉行末句号 列表项 id 改为必填,去掉非空断言 新增 useFormDialog 统一表单弹窗流程 菜单表单在小程序端改由 flex 派生滚动区高度 声明 packageManager 为 pnpm@10.34.5
33 lines
1.1 KiB
TypeScript
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(),
|
|
],
|
|
};
|