tool.xpcool.com/unocss.config.ts
夏犀麟 6e25de5c21 feat: 全站拖拽上传 + 图片压缩批量与多选项优化
- 新增 UploadDrop 通用组件:点击选择 + 拖拽上传、图片缩略图回显、
  批量/单文件、删除,替代各页面的 t-upload 文件模式
- 图片压缩重写:批量(最多 20 张)、按质量/限制大小双模式、
  等比缩放、保持原格式、JPG 透明图白底填充、jszip 批量下载
- 修复压缩页历史解析正则 bug(/| jpg/ 恒为 true)与 slider label 类型错误
- 裁剪/二维码/Base64/哈希/OCR 页面统一接入 UploadDrop,文件变化改用 watch 响应
- 更新 agents.md 与 README:UploadDrop 约定、新坑位与依赖说明
2026-08-21 15:37:06 +08:00

19 lines
726 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { defineConfig, presetUno, transformerDirectives } from 'unocss'
/**
* UnoCSS 配置:仅使用 presetUno类 Tailwind 原子类),
* 颜色值统一走 TDesign 的 CSS 变量,自动适配暗黑/浅色主题。
*/
export default defineConfig({
presets: [presetUno()],
transformers: [transformerDirectives()],
shortcuts: {
// 工具页面通用容器
'page-wrap': 'mx-auto w-full max-w-5xl',
// 表单行:标签 + 控件 的通用栅格(响应式)
'form-row': 'flex flex-col gap-2 md:flex-row md:items-center md:gap-4',
// 结果代码块
'code-block': 'rounded-md bg-[var(--td-bg-color-secondarycontainer)] p-3 font-mono text-13px break-all whitespace-pre-wrap',
},
})