feat: 新增5种表格主题风格
- ocean 海洋蓝:清爽专业,适合商务科技场景 - forest 森林绿:自然护眼,适合长时间阅读 - sunset 日落橙:温暖活力,吸引注意力 - lavender 薰衣草紫:优雅浪漫,柔和梦幻 - minimal 极简灰:干净现代,强调内容本身 现在共10种表格主题可选
This commit is contained in:
@@ -103,6 +103,11 @@ C, 20, 30, 40</pre>
|
||||
<option value="macarons">马卡龙</option>
|
||||
<option value="gradient">渐变</option>
|
||||
<option value="retro">复古</option>
|
||||
<option value="ocean">海洋</option>
|
||||
<option value="forest">森林</option>
|
||||
<option value="sunset">日落</option>
|
||||
<option value="lavender">薰衣草</option>
|
||||
<option value="minimal">极简</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -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: '边框宽度' },
|
||||
|
||||
Reference in New Issue
Block a user