tool.xpcool.com/unocss.config.ts
夏犀麟 e3c1534263 feat: 初始化纯前端在线工具站
- Vite + Vue3 + Pinia + TypeScript + UnoCSS + TDesign 技术栈
- 左侧固定导航 + 暗黑/浅色主题 + PC/移动端响应式布局
- 14 个工具:图片压缩/裁剪、二维码、JSON、时间戳、Base64、
  JWT、Cron、进制转换、哈希、身份证、地址解析、URL 解析、OCR
- 本地历史记录(localStorage)与通用复制/下载/错误提示组件
- 所有文件处理均在浏览器本地完成,不上传服务器
2026-08-21 12:15:33 +08:00

19 lines
736 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 px-4 py-6',
// 表单行:标签 + 控件 的通用栅格(响应式)
'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',
},
})