|
1 | 1 | # Element Plus Theme Editor |
2 | 2 |
|
3 | | -[English](README.en.md) | 简体中文 |
| 3 | +English | [简体中文](README.zh.md) |
4 | 4 |
|
5 | | -Element Plus 主题变量编辑工具,帮助设计师快速调整和预览 Element Plus 组件的主题样式。 |
| 5 | +A theme variable editor for Element Plus component library, helping designers quickly adjust and preview Element Plus component styles. |
6 | 6 |
|
7 | | -## 项目背景 |
| 7 | +## Project Background |
8 | 8 |
|
9 | | -本项目旨在解决设计人员频繁更换配色主题的问题。通过提供可视化的主题编辑工具,让设计师能够自主调整主题变量并导出配置,减少开发人员的工作负担。 |
| 9 | +This project aims to solve the problem of frequent theme changes by designers. By providing a visual theme editing tool, designers can independently adjust theme variables and export configurations, reducing the workload of developers. |
10 | 10 |
|
11 | | -## 技术栈 |
| 11 | +## Tech Stack |
12 | 12 |
|
13 | 13 | - Vue 3 |
14 | 14 | - TypeScript |
15 | 15 | - Tailwind CSS |
16 | 16 | - Element Plus |
17 | 17 |
|
18 | | -## 功能特性 |
| 18 | +## Features |
19 | 19 |
|
20 | | -### 1. 主题变量编辑 |
| 20 | +### 1. Theme Variable Editing |
21 | 21 |
|
22 | | -左侧为变量编辑区,右侧为组件展示区。支持以下类型的变量编辑: |
| 22 | +The interface is divided into two sections: variable editing area on the left and component preview area on the right. Supports editing of the following variable types: |
23 | 23 |
|
24 | | -- 颜色变量 |
25 | | -- 尺寸变量 |
26 | | -- 风格变量 |
27 | | -- 其他变量 |
| 24 | +- Color variables |
| 25 | +- Size variables |
| 26 | +- Style variables |
| 27 | +- Other variables |
28 | 28 |
|
29 | | - |
| 29 | + |
30 | 30 |
|
31 | | -### 2. 实时预览 |
| 31 | +### 2. Real-time Preview |
32 | 32 |
|
33 | | -编辑变量后,右侧组件区域会实时应用新的主题样式,方便设计师直观地查看效果。 |
| 33 | +After editing variables, the component area on the right will immediately apply the new theme styles, allowing designers to intuitively view the effects. |
34 | 34 |
|
35 | | -### 3. 黑白主题切换 |
| 35 | +### 3. Light/Dark Theme Toggle |
36 | 36 |
|
37 | | -支持在亮色和暗色主题之间快速切换,方便设计师在不同场景下预览效果。 |
| 37 | +Supports quick switching between light and dark themes, making it convenient for designers to preview effects in different scenarios. |
38 | 38 |
|
39 | | - |
| 39 | + |
40 | 40 |
|
41 | | -### 4. 导出配置 |
| 41 | +### 4. Export Configuration |
42 | 42 |
|
43 | | -支持将编辑后的主题变量导出为 CSS 文件,方便开发人员直接使用。 |
| 43 | +Supports exporting edited theme variables as a CSS file, making it easy for developers to use directly. |
44 | 44 |
|
45 | | - |
| 45 | + |
46 | 46 |
|
47 | | -导出的css变量文件示例: |
| 47 | +The exported CSS variable file example: |
48 | 48 |
|
49 | 49 | ``` |
50 | 50 | --el-color-primary: #FF8340; |
51 | 51 | ``` |
52 | 52 |
|
53 | | -## 快速开始 |
| 53 | +## Quick Start |
54 | 54 |
|
55 | | -### 安装依赖 |
| 55 | +### Install Dependencies |
56 | 56 |
|
57 | 57 | ```sh |
58 | 58 | npm install |
59 | 59 | ``` |
60 | 60 |
|
61 | | -### 启动开发服务器 |
| 61 | +### Start Development Server |
62 | 62 |
|
63 | 63 | ```sh |
64 | 64 | npm run dev |
65 | 65 | ``` |
66 | 66 |
|
67 | | -访问地址:http://localhost:5173/index.html#/theme/component |
| 67 | +Access URL: http://localhost:5173/index.html#/theme/component |
68 | 68 |
|
69 | | -### 构建生产版本 |
| 69 | +### Build for Production |
70 | 70 |
|
71 | 71 | ```sh |
72 | 72 | npm run build |
73 | 73 | ``` |
74 | 74 |
|
75 | | -## 开发相关 |
| 75 | +## Development |
76 | 76 |
|
77 | | -### 推荐开发环境 |
| 77 | +### Recommended IDE Setup |
78 | 78 |
|
79 | | -- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (并禁用 Vetur) |
| 79 | +- [VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur) |
80 | 80 |
|
81 | | -### 代码检查 |
| 81 | +### Code Linting |
82 | 82 |
|
83 | 83 | ```sh |
84 | 84 | npm run lint |
85 | 85 | ``` |
86 | 86 |
|
87 | | -## 许可证 |
| 87 | +## License |
88 | 88 |
|
89 | 89 | [MIT](LICENSE) |
0 commit comments