From 13abdea15b58e750e60f6461f575b55b96931eb9 Mon Sep 17 00:00:00 2001 From: hz4th_coder Date: Fri, 17 Jul 2026 12:55:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E5=E7=A7=8D=E8=A1=A8?= =?UTF-8?q?=E6=A0=BC=E4=B8=BB=E9=A2=98=E9=A3=8E=E6=A0=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ocean 海洋蓝:清爽专业,适合商务科技场景 - forest 森林绿:自然护眼,适合长时间阅读 - sunset 日落橙:温暖活力,吸引注意力 - lavender 薰衣草紫:优雅浪漫,柔和梦幻 - minimal 极简灰:干净现代,强调内容本身 现在共10种表格主题可选 --- index.html | 5 +++++ server.js | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 1159498..960b248 100644 --- a/index.html +++ b/index.html @@ -103,6 +103,11 @@ C, 20, 30, 40 + + + + + diff --git a/server.js b/server.js index 621370a..89fdb49 100644 --- a/server.js +++ b/server.js @@ -470,6 +470,51 @@ const tableThemes = { borderColor: '#d4a5a5', stripeColor: '#f6e8c3', titleColor: '#444444' + }, + ocean: { + bgColor: '#f0f8ff', + headerBg: '#0077b6', + headerColor: '#ffffff', + cellColor: '#023e58', + borderColor: '#90e0ef', + stripeColor: '#caf0f8', + titleColor: '#023e58' + }, + forest: { + bgColor: '#f5faf5', + headerBg: '#2d6a4f', + headerColor: '#ffffff', + cellColor: '#1b4332', + borderColor: '#95d5b2', + stripeColor: '#d8f3dc', + titleColor: '#1b4332' + }, + sunset: { + bgColor: '#fff8f0', + headerBg: '#e85d04', + headerColor: '#ffffff', + cellColor: '#6a040f', + borderColor: '#ffba08', + stripeColor: '#fff3e0', + titleColor: '#6a040f' + }, + lavender: { + bgColor: '#faf5ff', + headerBg: '#7c3aed', + headerColor: '#ffffff', + cellColor: '#4c1d95', + borderColor: '#c4b5fd', + stripeColor: '#ede9fe', + titleColor: '#4c1d95' + }, + minimal: { + bgColor: '#ffffff', + headerBg: '#f8f9fa', + headerColor: '#212529', + cellColor: '#495057', + borderColor: '#dee2e6', + stripeColor: '#f8f9fa', + titleColor: '#212529' } }; @@ -780,7 +825,7 @@ app.get('/api/docs', (req, res) => { params: { data: { type: 'string', required: true, description: 'CSV 格式数据(第一行表头)' }, title: { type: 'string', default: '', description: '表格标题' }, - theme: { type: 'string', default: 'default', options: ['default', 'dark', 'macarons', 'gradient', 'retro'], description: '主题风格' }, + theme: { type: 'string', default: 'default', options: ['default', 'dark', 'macarons', 'gradient', 'retro', 'ocean', 'forest', 'sunset', 'lavender', 'minimal'], description: '主题风格' }, fontSize: { type: 'number', default: 14, description: '字体大小' }, cellPadding: { type: 'number', default: 12, description: '单元格内边距' }, borderWidth: { type: 'number', default: 1, description: '边框宽度' },