# tools-for-utools **Repository Path**: htttaozi/tools-for-utools ## Basic Information - **Project Name**: tools-for-utools - **Description**: utools小工具,集成typescrpit+vue3 - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-02-10 - **Last Updated**: 2026-02-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 🚀 uTools PDF Tools | 现代化文档处理插件
![Vue](https://img.shields.io/badge/Vue.js-35495E?style=for-the-badge&logo=vue.js&logoColor=4FC08D) ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white) ![Vite](https://img.shields.io/badge/Vite-B73BFE?style=for-the-badge&logo=vite&logoColor=FFD62E) ![TailwindCSS](https://img.shields.io/badge/Tailwind_CSS-38B2AC?style=for-the-badge&logo=tailwind-css&logoColor=white) ![uTools](https://img.shields.io/badge/uTools-Plugin-1D212F?style=for-the-badge&logo=utools&logoColor=white) ![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge) **一款基于 uTools 平台的生产力工具,专注于 PDF 合并与图片文档转换。** **采用 Vue 3 + TypeScript 全栈开发,带来极致的性能与开发体验。** [快速开始](#-快速开始-getting-started) • [功能特性](#-核心特性-features) • [技术架构](#-技术栈-tech-stack) • [贡献指南](#-贡献指南-contributing)
## 📸 预览 (Preview) > ![App Screenshot](preview/1.png) ## ✨ 核心特性 (Features) ### 📚 PDF 智能合并 - **隐私优先**:基于 `pdf-lib` 本地引擎,文件无需上传服务器,绝对安全。 - **极速处理**:支持大文件毫秒级合并,无惧千页文档。 - **灵活操作**:支持多选、拖拽排序,所见即所得。 ### 🖼️ 图片转 Word (Docx) - **一键整合**:将多张图片自动排版并导出为 `.docx` 文档。 - **智能适配**:自动计算页面边距与图片尺寸,确保打印效果完美。 ### ⚡ 现代化架构 - **全链路 TypeScript**: 从渲染进程 (Renderer) 到 预加载脚本 (Preload),享受完整的类型安全。 - **极速构建**: 采用 Vite 驱动,开发启动瞬间完成。 - **组件化设计**: 封装 `Base` 系列基础组件,代码结构清晰可维护。 ## 🛠️ 技术栈 (Tech Stack) 本项目采用目前前端领域最前沿的技术组合: - **Core**: [Vue 3](https://vuejs.org/) (Composition API) + [TypeScript](https://www.typescriptlang.org/) - **Build Tool**: [Vite](https://vitejs.dev/) + [pnpm](https://pnpm.io/) - **Styling**: [Tailwind CSS](https://tailwindcss.com/) + [Less](https://lesscss.org/) - **PDF Engine**: [pdf-lib](https://pdf-lib.js.org/) - **Docx Engine**: [docx](https://docx.js.org/) - **Code Quality**: [ESLint](https://eslint.org/) (@antfu/eslint-config) ## 📂 项目结构 (Project Structure) ```bash pdf-tools/ ├── public/ # 静态资源与 uTools 插件配置 │ ├── plugin.json # uTools 插件入口配置 │ └── preload/ # 编译后的预加载脚本 (自动生成) ├── src/ # 渲染进程源码 (Vue 3) │ ├── components/ # 通用组件 (Base*) │ ├── hooks/ # 组合式函数 │ ├── utils/ # 工具函数 │ └── App.vue # 主应用入口 ├── preload/ # 预加载脚本源码 (Node.js/Electron) │ ├── handlers/ # 业务逻辑处理 (PDF/Docx) │ ├── utils/ # Node 端工具函数 │ └── services.ts # 桥接接口定义 ├── scripts/ # 构建辅助脚本 └── dist/ # 构建产物目录 ``` ## 🚀 快速开始 (Getting Started) ### 环境要求 - Node.js >= 20 - pnpm >= 10 - uTools 开发者工具 ### 安装依赖 ```bash pnpm install ``` ### 开发模式 (Development) 启动 Vite 开发服务器,并自动编译 Preload 脚本: ```bash npm run dev ``` > 运行后,在 uTools 开发者工具中加载 `public/plugin.json` 即可进行调试。 ### 生产构建 (Build) 构建 Vue 应用并编译 Preload 脚本,产物将输出至 `dist/` 目录: ```bash npm run build ``` ## 🔧 调试指南 本项目支持在 uTools 环境下进行完整调试: 1. **渲染层调试**: 在插件运行界面按下 `F12` 即可呼出 DevTools (已在代码中开启)。 2. **逻辑层调试**: Preload 脚本变更后,需重启插件生效。 ## 🤝 贡献指南 (Contributing) 欢迎提交 Issue 和 Pull Request! 1. Fork 本仓库 2. 创建特性分支 (`git checkout -b feature/AmazingFeature`) 3. 提交更改 (`git commit -m 'Add some AmazingFeature'`) 4. 推送到分支 (`git push origin feature/AmazingFeature`) 5. 提交 Pull Request ## 📄 License 本项目基于 [MIT License](./LICENSE) 开源。 Copyright © 2026 taozi