jvs-ppt-ui 0.0.30 → 0.0.32

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,8 @@
1
1
  <script setup lang="ts">
2
2
  import { ref, reactive, watch, computed, nextTick } from 'vue'
3
- import { defaultStyleRecipe, builtinStyleRecipes, type StyleRecipe } from '../composables/presetThemes'
4
- import { useSlides } from '../composables/useSlides'
3
+ import { defaultStyleRecipe, builtinStyleRecipes, saveStyleRecipesToStorage, type StyleRecipe } from '../composables/presetThemes'
4
+ import { useSlides } from '../composables/useSlides'
5
+ import { useI18n } from '../composables/useI18n'
5
6
  import { generateMonoPalette } from '../utils/palette'
6
7
  import { SYS_FONTS, getFontStyleSupport } from '../configs/fonts'
7
8
  import QuickColorPopover from './QuickColorPopover.vue'
@@ -21,17 +22,21 @@ const emit = defineEmits<{
21
22
  (e: 'update:visible', val: boolean): void
22
23
  }>()
23
24
 
24
- const { slides, activeIndex, applyStyleRecipeToSlides, getThemeUsageSlides, getThemeUsageLabel, getActiveSlideThemeRecipe, activeSlide } = useSlides()
25
+ const { slides, activeIndex, applyStyleRecipeToSlides, getThemeUsageSlides, getThemeUsageLabel, getActiveSlideThemeRecipe, activeSlide, notify } = useSlides()
26
+ const { locale } = useI18n()
27
+ const isZh = computed(() => locale.value === 'zh')
25
28
 
26
- const temporaryCustomRecipe = ref<StyleRecipe | null>(null)
29
+ const temporaryCustomRecipes = ref<StyleRecipe[]>([])
27
30
 
28
- // Built-in Theme Presets for Far-Right Selector Column (computed including temporary custom theme)
31
+ // Built-in Theme Presets for Far-Right Selector Column (computed including temporary custom themes)
29
32
  const themePresetsList = computed<StyleRecipe[]>(() => {
30
33
  const list = builtinStyleRecipes && builtinStyleRecipes.length > 0
31
34
  ? [...builtinStyleRecipes]
32
35
  : [JSON.parse(JSON.stringify(defaultStyleRecipe))]
33
- if (temporaryCustomRecipe.value && !list.some(r => r.id === temporaryCustomRecipe.value?.id)) {
34
- list.push(temporaryCustomRecipe.value)
36
+ for (const temp of temporaryCustomRecipes.value) {
37
+ if (temp && !list.some(r => r.id === temp.id)) {
38
+ list.push(temp)
39
+ }
35
40
  }
36
41
  return list
37
42
  })
@@ -58,10 +63,35 @@ function selectThemePreset(preset: StyleRecipe) {
58
63
  }
59
64
  }
60
65
 
66
+ function handleAddNewTheme() {
67
+ if (activeRecipeId.value && localRecipe.value) {
68
+ draftCacheMap[activeRecipeId.value] = JSON.parse(JSON.stringify(localRecipe.value))
69
+ }
70
+ const baseRecipe = localRecipe.value || getActiveSlideThemeRecipe(activeSlide.value) || defaultStyleRecipe
71
+ const customCount = themePresetsList.value.filter(r => r.id.startsWith('custom-') || r.id.startsWith('theme-')).length + 1
72
+ const newCustom: StyleRecipe = JSON.parse(JSON.stringify(baseRecipe))
73
+ newCustom.id = 'custom-' + Date.now() + '-' + Math.floor(Math.random() * 1000)
74
+ newCustom.name = isZh.value ? `自定义主题 ${customCount}` : `Custom Theme ${customCount}`
75
+
76
+ temporaryCustomRecipes.value.push(newCustom)
77
+ activeRecipeId.value = newCustom.id
78
+ localRecipe.value = JSON.parse(JSON.stringify(newCustom))
79
+ draftCacheMap[newCustom.id] = JSON.parse(JSON.stringify(newCustom))
80
+
81
+ if (localRecipe.value?.chart?.chartColor) {
82
+ updateMonoPalette(localRecipe.value.chart.chartColor)
83
+ }
84
+ nextTick(() => {
85
+ const col = document.querySelector('.theme-selector-column')
86
+ if (col) col.scrollTop = col.scrollHeight
87
+ })
88
+ }
89
+
61
90
  const watchVisibleImmediate = (cb: (newVal: boolean) => void) => { watch([() => props.visible, () => props.initialRecipeId, () => props.targetMode], ([v]) => cb(v)); queueMicrotask(() => { if (props.visible) cb(true) }) }; watchVisibleImmediate((newVal) => {
62
91
  if (newVal) {
63
92
  applyScope.value = props.targetMode || 'all'
64
93
  Object.keys(draftCacheMap).forEach(key => delete draftCacheMap[key])
94
+ temporaryCustomRecipes.value = []
65
95
 
66
96
  const curSlideRecipe = getActiveSlideThemeRecipe(activeSlide.value)
67
97
 
@@ -71,17 +101,16 @@ const watchVisibleImmediate = (cb: (newVal: boolean) => void) => { watch([() =>
71
101
  curSlideRecipe ||
72
102
  defaultStyleRecipe
73
103
 
74
- const customCount = builtinStyleRecipes.filter(r => r.id.startsWith('custom-')).length + 1
104
+ const customCount = builtinStyleRecipes.filter(r => r.id.startsWith('custom-') || r.id.startsWith('theme-')).length + 1
75
105
  const newCustom: StyleRecipe = JSON.parse(JSON.stringify(baseRecipe))
76
106
  newCustom.id = 'custom-' + Date.now()
77
- newCustom.name = `${baseRecipe.name} (定制 ${customCount})`
107
+ newCustom.name = isZh.value ? `自定义主题 ${customCount}` : `Custom Theme ${customCount}`
78
108
 
79
- temporaryCustomRecipe.value = newCustom
109
+ temporaryCustomRecipes.value = [newCustom]
80
110
  activeRecipeId.value = newCustom.id
81
111
  localRecipe.value = JSON.parse(JSON.stringify(newCustom))
82
112
  draftCacheMap[newCustom.id] = JSON.parse(JSON.stringify(newCustom))
83
113
  } else {
84
- temporaryCustomRecipe.value = null
85
114
  const targetRecipe = (props.initialRecipeId && builtinStyleRecipes.find(t => t.id === props.initialRecipeId)) ||
86
115
  curSlideRecipe ||
87
116
  defaultStyleRecipe
@@ -95,7 +124,7 @@ const watchVisibleImmediate = (cb: (newVal: boolean) => void) => { watch([() =>
95
124
  updateMonoPalette(localRecipe.value.chart.chartColor)
96
125
  }
97
126
  } else {
98
- temporaryCustomRecipe.value = null
127
+ temporaryCustomRecipes.value = []
99
128
  }
100
129
  })
101
130
 
@@ -131,41 +160,86 @@ const scannedFontOptions = computed(() => {
131
160
 
132
161
  return Array.from(fontsSet).filter(Boolean).map(f => {
133
162
  const sys = SYS_FONTS.find(s => s.value === f || s.label === f)
163
+ const rawLabel = sys ? sys.label : f
164
+ const label = (f === 'SourceHanSansCN' || f === '思源黑体')
165
+ ? (isZh.value ? '思源黑体 CN' : 'SourceHanSansCN')
166
+ : rawLabel
134
167
  return {
135
- label: sys ? sys.label : f,
168
+ label,
136
169
  value: f,
137
170
  isCustom: sys ? !!sys.isCustom : false
138
171
  }
139
172
  })
140
173
  })
141
174
 
175
+ function persistSessionRecipes() {
176
+ if (activeRecipeId.value && localRecipe.value) {
177
+ draftCacheMap[activeRecipeId.value] = JSON.parse(JSON.stringify(localRecipe.value))
178
+ }
179
+ for (const temp of temporaryCustomRecipes.value) {
180
+ const latest = draftCacheMap[temp.id] || temp
181
+ const idx = builtinStyleRecipes.findIndex(r => r.id === latest.id)
182
+ if (idx >= 0) {
183
+ builtinStyleRecipes[idx] = JSON.parse(JSON.stringify(latest))
184
+ } else {
185
+ builtinStyleRecipes.push(JSON.parse(JSON.stringify(latest)))
186
+ }
187
+ }
188
+ for (const [id, draft] of Object.entries(draftCacheMap)) {
189
+ const idx = builtinStyleRecipes.findIndex(r => r.id === id)
190
+ if (idx >= 0) {
191
+ builtinStyleRecipes[idx] = JSON.parse(JSON.stringify(draft))
192
+ } else {
193
+ builtinStyleRecipes.push(JSON.parse(JSON.stringify(draft)))
194
+ }
195
+ }
196
+ saveStyleRecipesToStorage(builtinStyleRecipes)
197
+ }
198
+
142
199
  function closeDialog() {
143
- temporaryCustomRecipe.value = null
200
+ temporaryCustomRecipes.value = []
144
201
  Object.keys(draftCacheMap).forEach(key => delete draftCacheMap[key])
145
202
  emit('update:visible', false)
146
203
  }
147
204
 
148
205
  function handleSave() {
149
206
  if (!localRecipe.value) return
207
+ persistSessionRecipes()
150
208
  applyStyleRecipeToSlides(localRecipe.value, 'used')
151
- temporaryCustomRecipe.value = null
152
209
  closeDialog()
153
210
  }
154
211
 
155
212
  function handleApplyToCurrent() {
156
213
  if (!localRecipe.value) return
214
+ persistSessionRecipes()
157
215
  applyStyleRecipeToSlides(localRecipe.value, 'single')
158
- temporaryCustomRecipe.value = null
159
216
  closeDialog()
160
217
  }
161
218
 
162
219
  function handleApplyToAll() {
163
220
  if (!localRecipe.value) return
221
+ persistSessionRecipes()
164
222
  applyStyleRecipeToSlides(localRecipe.value, 'all')
165
- temporaryCustomRecipe.value = null
166
223
  closeDialog()
167
224
  }
168
225
 
226
+ function handleAddStyleColor(e: MouseEvent) {
227
+ if (!localRecipe.value.styleColors) {
228
+ localRecipe.value.styleColors = []
229
+ }
230
+ const defaultNewColor = '#3b82f6'
231
+ localRecipe.value.styleColors.push(defaultNewColor)
232
+ const newIdx = localRecipe.value.styleColors.length - 1
233
+ nextTick(() => {
234
+ openColorPickerForSwatch(e, defaultNewColor, newIdx)
235
+ })
236
+ }
237
+
238
+ function handleRemoveStyleColor(idx: number) {
239
+ if (!localRecipe.value.styleColors || localRecipe.value.styleColors.length <= 1) return
240
+ localRecipe.value.styleColors.splice(idx, 1)
241
+ }
242
+
169
243
  function updateArrayColor(arrName: 'styleColors' | 'chartPalette', index: number, color: string) {
170
244
  if (arrName === 'styleColors') {
171
245
  const oldColor = localRecipe.value.styleColors[index]
@@ -242,7 +316,8 @@ function getSwatchBackground(col: string): string {
242
316
 
243
317
  function getColorUsageList(colHex: string, index: number): string[] {
244
318
  const recipe = localRecipe.value
245
- if (!recipe) return [`Theme color ${index + 1}`]
319
+ const zh = isZh.value
320
+ if (!recipe) return [zh ? `主题色 ${index + 1}` : `Theme color ${index + 1}`]
246
321
 
247
322
  const usages: string[] = []
248
323
  const norm = (c?: string) => (c ? c.toLowerCase().replace(/\s+/g, '').trim() : '')
@@ -250,66 +325,95 @@ function getColorUsageList(colHex: string, index: number): string[] {
250
325
 
251
326
  // 1. 背景系统
252
327
  if (norm(recipe.backgroundColor) === curColor) {
253
- usages.push('background')
328
+ usages.push(zh ? '背景颜色' : 'background')
254
329
  }
255
330
  if (norm(recipe.table?.bgColor) === curColor) {
256
- usages.push('Table background')
331
+ usages.push(zh ? '表格背景' : 'Table background')
257
332
  }
258
333
  if (norm(recipe.table?.headerTextColor) === curColor) {
259
- usages.push('Table header text')
334
+ usages.push(zh ? '表头文字' : 'Table header text')
260
335
  }
261
336
 
262
337
  // 2. 主强调色系统
263
338
  if (norm(recipe.linkColor) === curColor) {
264
- usages.push('link')
339
+ usages.push(zh ? '链接' : 'link')
265
340
  }
266
341
  if (norm(recipe.table?.headerBg) === curColor) {
267
- usages.push('Table header background')
342
+ usages.push(zh ? '表头背景' : 'Table header background')
268
343
  }
269
344
  if (norm(recipe.table?.borderColor) === curColor) {
270
- usages.push('Table border')
345
+ usages.push(zh ? '表格边框' : 'Table border')
271
346
  }
272
347
  if (norm(recipe.chart?.chartColor) === curColor) {
273
- usages.push('Chart')
348
+ usages.push(zh ? '图表主色' : 'Chart')
274
349
  }
275
350
  if (norm(recipe.shape?.fillColor) === curColor) {
276
- usages.push('Shape')
351
+ usages.push(zh ? '形状填充' : 'Shape')
277
352
  }
278
353
 
279
354
  // 3. 辅助标号系统
280
355
  if (norm(recipe.bulletPointsColor) === curColor) {
281
- usages.push('Bullet points')
356
+ usages.push(zh ? '项目符号' : 'Bullet points')
282
357
  }
283
358
 
284
359
  // 4. 文字排版系统
285
- if (norm(recipe.textStyles?.title?.color) === curColor) usages.push('Title')
286
- if (norm(recipe.textStyles?.headline?.color) === curColor) usages.push('Headline')
287
- if (norm(recipe.textStyles?.subheadline?.color) === curColor) usages.push('Subheadline')
288
- if (norm(recipe.textStyles?.normalText?.color) === curColor) usages.push('Normal Text')
289
- if (norm(recipe.textStyles?.smallText?.color) === curColor) usages.push('Small text')
360
+ if (norm(recipe.textStyles?.title?.color) === curColor) usages.push(zh ? '大标题' : 'Title')
361
+ if (norm(recipe.textStyles?.headline?.color) === curColor) usages.push(zh ? '一级标题' : 'Headline')
362
+ if (norm(recipe.textStyles?.subheadline?.color) === curColor) usages.push(zh ? '副标题' : 'Subheadline')
363
+ if (norm(recipe.textStyles?.normalText?.color) === curColor) usages.push(zh ? '正文文本' : 'Normal Text')
364
+ if (norm(recipe.textStyles?.smallText?.color) === curColor) usages.push(zh ? '小字/注释' : 'Small text')
290
365
 
291
366
  // 5. 深色内容与线条结构
292
- if (norm(recipe.table?.textColor) === curColor) usages.push('Table text')
367
+ if (norm(recipe.table?.textColor) === curColor) usages.push(zh ? '表格文字' : 'Table text')
293
368
  if (norm(recipe.table?.alternateTextColor) === curColor || (norm(recipe.table?.textColor) === curColor && !recipe.table?.alternateTextColor)) {
294
- usages.push('Table alternating text')
369
+ usages.push(zh ? '表格交替行文字' : 'Table alternating text')
295
370
  }
296
- if (norm(recipe.chart?.textColor) === curColor) usages.push('Chart text')
371
+ if (norm(recipe.chart?.textColor) === curColor) usages.push(zh ? '图表文字' : 'Chart text')
297
372
  if (norm(recipe.chart?.labelColor) === curColor || norm(recipe.chart?.gridColor) === curColor) {
298
- usages.push('Chart axis')
373
+ usages.push(zh ? '图表坐标轴' : 'Chart axis')
299
374
  }
300
- if (norm(recipe.shape?.borderColor) === curColor) usages.push('Shape stroke')
301
- if (norm(recipe.shape?.textColor) === curColor) usages.push('Shape text')
375
+ if (norm(recipe.shape?.borderColor) === curColor) usages.push(zh ? '形状边框' : 'Shape stroke')
376
+ if (norm(recipe.shape?.textColor) === curColor) usages.push(zh ? '形状文字' : 'Shape text')
302
377
 
303
378
  // 6. 表格交替背景
304
379
  if (norm(recipe.table?.alternateRowBg) === curColor) {
305
- usages.push('Table alternating background')
380
+ usages.push(zh ? '表格交替行背景' : 'Table alternating background')
306
381
  }
307
382
 
308
383
  if (usages.length > 0) {
309
384
  return Array.from(new Set(usages))
310
385
  }
311
386
 
312
- return [`Theme color ${index + 1}`]
387
+ return [zh ? `主题色 ${index + 1}` : `Theme color ${index + 1}`]
388
+ }
389
+
390
+ function formatRoleLabel(role: string): string {
391
+ if (!isZh.value) return role
392
+ const map: Record<string, string> = {
393
+ 'Title': '大标题',
394
+ 'Headline': '一级标题',
395
+ 'Subheadline': '副标题',
396
+ 'Normal text': '正文文本',
397
+ 'Small text': '小字/注释',
398
+ 'Table': '表格',
399
+ 'Chart': '图表'
400
+ }
401
+ return map[role] || role
402
+ }
403
+
404
+ function getPaletteDisplayLabel(name: string): string {
405
+ if (!isZh.value) return name
406
+ const map: Record<string, string> = {
407
+ 'Chart colors - Mono': '单色渐变',
408
+ 'Diverging': '对比色系',
409
+ 'Saturated': '高饱和色',
410
+ 'Colorblind friendly': '色觉友好',
411
+ 'Morning dawn': '晨曦暖调',
412
+ 'Blue ocean': '深海蓝调',
413
+ 'Woody greens': '森系绿意',
414
+ 'Sunburst': '落日余晖'
415
+ }
416
+ return map[name] || name
313
417
  }
314
418
 
315
419
  interface FontUsageGroup {
@@ -389,12 +493,12 @@ function getSupportedVariants(fontFamily: string) {
389
493
 
390
494
  function getFontStyleOptions(fontFamily: string) {
391
495
  const v = getSupportedVariants(fontFamily)
392
-
496
+ const zh = isZh.value
393
497
  return [
394
- { label: 'Regular', value: 'normal', disabled: false },
395
- { label: v.italic ? 'Regular Italic' : 'Regular Italic *', value: 'italic', disabled: !v.italic },
396
- { label: v.bold ? 'Bold' : 'Bold *', value: 'bold', disabled: !v.bold },
397
- { label: v['bold-italic'] ? 'Bold Italic' : 'Bold Italic *', value: 'bold-italic', disabled: !v['bold-italic'] }
498
+ { label: zh ? '常规' : 'Regular', value: 'normal', disabled: false },
499
+ { label: zh ? (v.italic ? '斜体' : '斜体 *') : (v.italic ? 'Regular Italic' : 'Regular Italic *'), value: 'italic', disabled: !v.italic },
500
+ { label: zh ? (v.bold ? '粗体' : '粗体 *') : (v.bold ? 'Bold' : 'Bold *'), value: 'bold', disabled: !v.bold },
501
+ { label: zh ? (v['bold-italic'] ? '粗斜体' : '粗斜体 *') : (v['bold-italic'] ? 'Bold Italic' : 'Bold Italic *'), value: 'bold-italic', disabled: !v['bold-italic'] }
398
502
  ]
399
503
  }
400
504
 
@@ -1008,14 +1112,14 @@ function handlePickerChange(val: any) {
1008
1112
  <div class="config-form">
1009
1113
  <!-- Name Input -->
1010
1114
  <div class="form-group">
1011
- <label>Name</label>
1012
- <el-input v-model="localRecipe.name" placeholder="Enter your style name" size="large" />
1115
+ <label>{{ isZh ? '主题名称' : 'Name' }}</label>
1116
+ <el-input v-model="localRecipe.name" :placeholder="isZh ? '请输入主题名称' : 'Enter your style name'" size="large" />
1013
1117
  </div>
1014
1118
 
1015
1119
  <!-- Style colors (Hover tooltip matching Image 2 + pickerButtonRef Virtual Mounting) -->
1016
1120
  <div class="form-group">
1017
1121
  <div class="label-with-icon">
1018
- <label>Style colors</label>
1122
+ <label>{{ isZh ? '主题配色' : 'Style colors' }}</label>
1019
1123
  <span class="info-icon" title="鼠标移动到色块上可查看该颜色被哪些元素使用,点击色块调出取色器">ⓘ</span>
1020
1124
  </div>
1021
1125
  <div class="colors-row" style="display: flex; gap: 8px; flex-wrap: wrap;">
@@ -1029,7 +1133,7 @@ function handlePickerChange(val: any) {
1029
1133
  </div>
1030
1134
  </div>
1031
1135
  </template>
1032
- <div class="swatch-picker-trigger" @click="(e) => openColorPickerForSwatch(e, col, idx)">
1136
+ <div class="swatch-picker-trigger" @click="(e) => openColorPickerForSwatch(e, col, idx)" @contextmenu.prevent="localRecipe.styleColors.length > 8 ? handleRemoveStyleColor(idx) : null">
1033
1137
  <div class="swatch-circle"
1034
1138
  :style="{
1035
1139
  background: getSwatchBackground(col),
@@ -1043,13 +1147,22 @@ function handlePickerChange(val: any) {
1043
1147
  </div>
1044
1148
  </el-tooltip>
1045
1149
  </div>
1150
+ <!-- 新增主题色按钮 -->
1151
+ <el-tooltip placement="bottom" effect="dark" :content="isZh ? '新增主题色' : 'Add theme color'" :show-after="50">
1152
+ <div class="swatch-circle add-color-swatch-btn" @click="(e) => handleAddStyleColor(e)">
1153
+ <svg viewBox="0 0 16 16" width="12" height="12" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round">
1154
+ <line x1="8" y1="3" x2="8" y2="13" />
1155
+ <line x1="3" y1="8" x2="13" y2="8" />
1156
+ </svg>
1157
+ </div>
1158
+ </el-tooltip>
1046
1159
  </div>
1047
1160
  </div>
1048
1161
 
1049
1162
  <!-- Style fonts -->
1050
1163
  <div class="form-group">
1051
1164
  <div class="label-with-icon" style="margin-bottom: 6px;">
1052
- <label>Style fonts</label>
1165
+ <label>{{ isZh ? '主题字体' : 'Style fonts' }}</label>
1053
1166
  <span class="info-icon" title="鼠标移入字体选择框上可查看该字体用于哪些文本内容">ⓘ</span>
1054
1167
  </div>
1055
1168
  <div class="fonts-column" style="display: flex; flex-direction: column; gap: 8px;">
@@ -1060,7 +1173,7 @@ function handlePickerChange(val: any) {
1060
1173
  <template #content>
1061
1174
  <div class="color-usage-list">
1062
1175
  <div v-for="role in group.roles" :key="role" class="usage-item">
1063
- {{ role }}
1176
+ {{ formatRoleLabel(role) }}
1064
1177
  </div>
1065
1178
  </div>
1066
1179
  </template>
@@ -1083,7 +1196,7 @@ function handlePickerChange(val: any) {
1083
1196
 
1084
1197
  <!-- Background color -->
1085
1198
  <div class="form-group flex-between">
1086
- <label>Background color</label>
1199
+ <label>{{ isZh ? '背景颜色' : 'Background color' }}</label>
1087
1200
  <div class="swatch-circle large-swatch"
1088
1201
  :style="{ backgroundColor: localRecipe.backgroundColor, border: '1px solid #cbd5e1', cursor: 'pointer' }"
1089
1202
  @click="(e) => openColorPickerForSwatch(e, localRecipe.backgroundColor, 'backgroundColor')"></div>
@@ -1091,7 +1204,7 @@ function handlePickerChange(val: any) {
1091
1204
 
1092
1205
  <!-- Bullet points color -->
1093
1206
  <div class="form-group flex-between">
1094
- <label>Bullet points color</label>
1207
+ <label>{{ isZh ? '项目符号颜色' : 'Bullet points color' }}</label>
1095
1208
  <div class="swatch-circle large-swatch"
1096
1209
  :style="{ backgroundColor: localRecipe.bulletPointsColor, border: '1px solid #cbd5e1', cursor: 'pointer' }"
1097
1210
  @click="(e) => openColorPickerForSwatch(e, localRecipe.bulletPointsColor, 'bulletPointsColor')"></div>
@@ -1100,23 +1213,23 @@ function handlePickerChange(val: any) {
1100
1213
  <!-- Collapsible Accordion Sections (Strict Accordion Mode: Only One Item Expanded) -->
1101
1214
  <el-collapse v-model="activeAccordion" accordion class="style-accordion">
1102
1215
  <!-- Link -->
1103
- <el-collapse-item title="Link" name="link">
1216
+ <el-collapse-item :title="isZh ? '链接' : 'Link'" name="link">
1104
1217
  <div class="accordion-content" style="padding-top: 4px;">
1105
1218
  <div class="form-group flex-between" style="margin-bottom: 12px;">
1106
- <label>Color</label>
1219
+ <label>{{ isZh ? '颜色' : 'Color' }}</label>
1107
1220
  <div class="swatch-circle"
1108
1221
  :style="{ backgroundColor: localRecipe.linkColor, border: '1px solid #cbd5e1', cursor: 'pointer' }"
1109
1222
  @click="(e) => openColorPickerForSwatch(e, localRecipe.linkColor, 'linkColor')"></div>
1110
1223
  </div>
1111
1224
  <div class="form-group flex-between" style="margin-bottom: 0;">
1112
- <label>Underline</label>
1225
+ <label>{{ isZh ? '下划线' : 'Underline' }}</label>
1113
1226
  <el-switch v-model="localRecipe.linkUnderline" />
1114
1227
  </div>
1115
1228
  </div>
1116
1229
  </el-collapse-item>
1117
1230
 
1118
1231
  <!-- Title -->
1119
- <el-collapse-item title="Title" name="title">
1232
+ <el-collapse-item :title="isZh ? '大标题' : 'Title'" name="title">
1120
1233
  <div class="accordion-content" style="padding-top: 4px;">
1121
1234
  <div class="form-group" style="margin-bottom: 8px;">
1122
1235
  <el-select v-model="localRecipe.textStyles.title.fontFamily" placeholder="跟随全局标题字" clearable
@@ -1143,29 +1256,29 @@ function handlePickerChange(val: any) {
1143
1256
  </el-select>
1144
1257
  </div>
1145
1258
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1146
- <label>Letter spacing</label>
1259
+ <label>{{ isZh ? '字间距' : 'Letter spacing' }}</label>
1147
1260
  <el-input-number v-model="localRecipe.textStyles.title.letterSpacing" :min="0" :max="20"
1148
1261
  :step="0.5" controls-position="right" size="default" style="width: 90px;" />
1149
1262
  </div>
1150
1263
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1151
- <label>Line spacing</label>
1264
+ <label>{{ isZh ? '行间距' : 'Line spacing' }}</label>
1152
1265
  <el-input-number v-model="localRecipe.textStyles.title.lineHeight" :min="0.8" :max="3.0"
1153
1266
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1154
1267
  </div>
1155
1268
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1156
- <label>Paragraph spacing</label>
1269
+ <label>{{ isZh ? '段落间距' : 'Paragraph spacing' }}</label>
1157
1270
  <el-input-number v-model="localRecipe.textStyles.title.paragraphSpacing" :min="0" :max="40"
1158
1271
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1159
1272
  </div>
1160
1273
  <div class="form-group flex-between" style="margin-bottom: 0;">
1161
- <label>Uppercase</label>
1274
+ <label>{{ isZh ? '全部大写' : 'Uppercase' }}</label>
1162
1275
  <el-switch v-model="localRecipe.textStyles.title.uppercase" />
1163
1276
  </div>
1164
1277
  </div>
1165
1278
  </el-collapse-item>
1166
1279
 
1167
1280
  <!-- Headline -->
1168
- <el-collapse-item title="Headline" name="headline">
1281
+ <el-collapse-item :title="isZh ? '一级标题' : 'Headline'" name="headline">
1169
1282
  <div class="accordion-content" style="padding-top: 4px;">
1170
1283
  <div class="form-group" style="margin-bottom: 8px;">
1171
1284
  <el-select v-model="localRecipe.textStyles.headline.fontFamily" placeholder="跟随全局标题字" clearable
@@ -1192,29 +1305,29 @@ function handlePickerChange(val: any) {
1192
1305
  </el-select>
1193
1306
  </div>
1194
1307
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1195
- <label>Letter spacing</label>
1308
+ <label>{{ isZh ? '字间距' : 'Letter spacing' }}</label>
1196
1309
  <el-input-number v-model="localRecipe.textStyles.headline.letterSpacing" :min="0" :max="20"
1197
1310
  :step="0.5" controls-position="right" size="default" style="width: 90px;" />
1198
1311
  </div>
1199
1312
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1200
- <label>Line spacing</label>
1313
+ <label>{{ isZh ? '行间距' : 'Line spacing' }}</label>
1201
1314
  <el-input-number v-model="localRecipe.textStyles.headline.lineHeight" :min="0.8" :max="3.0"
1202
1315
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1203
1316
  </div>
1204
1317
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1205
- <label>Paragraph spacing</label>
1318
+ <label>{{ isZh ? '段落间距' : 'Paragraph spacing' }}</label>
1206
1319
  <el-input-number v-model="localRecipe.textStyles.headline.paragraphSpacing" :min="0" :max="40"
1207
1320
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1208
1321
  </div>
1209
1322
  <div class="form-group flex-between" style="margin-bottom: 0;">
1210
- <label>Uppercase</label>
1323
+ <label>{{ isZh ? '全部大写' : 'Uppercase' }}</label>
1211
1324
  <el-switch v-model="localRecipe.textStyles.headline.uppercase" />
1212
1325
  </div>
1213
1326
  </div>
1214
1327
  </el-collapse-item>
1215
1328
 
1216
1329
  <!-- Subheadline -->
1217
- <el-collapse-item title="Subheadline" name="subheadline">
1330
+ <el-collapse-item :title="isZh ? '副标题' : 'Subheadline'" name="subheadline">
1218
1331
  <div class="accordion-content" style="padding-top: 4px;">
1219
1332
  <div class="form-group" style="margin-bottom: 8px;">
1220
1333
  <el-select v-model="localRecipe.textStyles.subheadline.fontFamily" placeholder="跟随全局正文字" clearable
@@ -1241,29 +1354,29 @@ function handlePickerChange(val: any) {
1241
1354
  </el-select>
1242
1355
  </div>
1243
1356
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1244
- <label>Letter spacing</label>
1357
+ <label>{{ isZh ? '字间距' : 'Letter spacing' }}</label>
1245
1358
  <el-input-number v-model="localRecipe.textStyles.subheadline.letterSpacing" :min="0" :max="20"
1246
1359
  :step="0.5" controls-position="right" size="default" style="width: 90px;" />
1247
1360
  </div>
1248
1361
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1249
- <label>Line spacing</label>
1362
+ <label>{{ isZh ? '行间距' : 'Line spacing' }}</label>
1250
1363
  <el-input-number v-model="localRecipe.textStyles.subheadline.lineHeight" :min="0.8" :max="3.0"
1251
1364
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1252
1365
  </div>
1253
1366
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1254
- <label>Paragraph spacing</label>
1367
+ <label>{{ isZh ? '段落间距' : 'Paragraph spacing' }}</label>
1255
1368
  <el-input-number v-model="localRecipe.textStyles.subheadline.paragraphSpacing" :min="0" :max="40"
1256
1369
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1257
1370
  </div>
1258
1371
  <div class="form-group flex-between" style="margin-bottom: 0;">
1259
- <label>Uppercase</label>
1372
+ <label>{{ isZh ? '全部大写' : 'Uppercase' }}</label>
1260
1373
  <el-switch v-model="localRecipe.textStyles.subheadline.uppercase" />
1261
1374
  </div>
1262
1375
  </div>
1263
1376
  </el-collapse-item>
1264
1377
 
1265
1378
  <!-- Normal text -->
1266
- <el-collapse-item title="Normal text" name="normalText">
1379
+ <el-collapse-item :title="isZh ? '正文文本' : 'Normal text'" name="normalText">
1267
1380
  <div class="accordion-content" style="padding-top: 4px;">
1268
1381
  <div class="form-group" style="margin-bottom: 8px;">
1269
1382
  <el-select v-model="localRecipe.textStyles.normalText.fontFamily" placeholder="跟随全局正文字" clearable
@@ -1290,29 +1403,29 @@ function handlePickerChange(val: any) {
1290
1403
  </el-select>
1291
1404
  </div>
1292
1405
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1293
- <label>Letter spacing</label>
1406
+ <label>{{ isZh ? '字间距' : 'Letter spacing' }}</label>
1294
1407
  <el-input-number v-model="localRecipe.textStyles.normalText.letterSpacing" :min="0" :max="20"
1295
1408
  :step="0.5" controls-position="right" size="default" style="width: 90px;" />
1296
1409
  </div>
1297
1410
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1298
- <label>Line spacing</label>
1411
+ <label>{{ isZh ? '行间距' : 'Line spacing' }}</label>
1299
1412
  <el-input-number v-model="localRecipe.textStyles.normalText.lineHeight" :min="0.8" :max="3.0"
1300
1413
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1301
1414
  </div>
1302
1415
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1303
- <label>Paragraph spacing</label>
1416
+ <label>{{ isZh ? '段落间距' : 'Paragraph spacing' }}</label>
1304
1417
  <el-input-number v-model="localRecipe.textStyles.normalText.paragraphSpacing" :min="0" :max="40"
1305
1418
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1306
1419
  </div>
1307
1420
  <div class="form-group flex-between" style="margin-bottom: 0;">
1308
- <label>Uppercase</label>
1421
+ <label>{{ isZh ? '全部大写' : 'Uppercase' }}</label>
1309
1422
  <el-switch v-model="localRecipe.textStyles.normalText.uppercase" />
1310
1423
  </div>
1311
1424
  </div>
1312
1425
  </el-collapse-item>
1313
1426
 
1314
1427
  <!-- Small text -->
1315
- <el-collapse-item title="Small text" name="smallText">
1428
+ <el-collapse-item :title="isZh ? '小字/注释' : 'Small text'" name="smallText">
1316
1429
  <div class="accordion-content" style="padding-top: 4px;">
1317
1430
  <div class="form-group" style="margin-bottom: 8px;">
1318
1431
  <el-select v-model="localRecipe.textStyles.smallText.fontFamily" placeholder="跟随全局正文字" clearable
@@ -1339,32 +1452,32 @@ function handlePickerChange(val: any) {
1339
1452
  </el-select>
1340
1453
  </div>
1341
1454
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1342
- <label>Letter spacing</label>
1455
+ <label>{{ isZh ? '字间距' : 'Letter spacing' }}</label>
1343
1456
  <el-input-number v-model="localRecipe.textStyles.smallText.letterSpacing" :min="0" :max="20"
1344
1457
  :step="0.5" controls-position="right" size="default" style="width: 90px;" />
1345
1458
  </div>
1346
1459
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1347
- <label>Line spacing</label>
1460
+ <label>{{ isZh ? '行间距' : 'Line spacing' }}</label>
1348
1461
  <el-input-number v-model="localRecipe.textStyles.smallText.lineHeight" :min="0.8" :max="3.0"
1349
1462
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1350
1463
  </div>
1351
1464
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1352
- <label>Paragraph spacing</label>
1465
+ <label>{{ isZh ? '段落间距' : 'Paragraph spacing' }}</label>
1353
1466
  <el-input-number v-model="localRecipe.textStyles.smallText.paragraphSpacing" :min="0" :max="40"
1354
1467
  :step="0.25" controls-position="right" size="default" style="width: 90px;" />
1355
1468
  </div>
1356
1469
  <div class="form-group flex-between" style="margin-bottom: 0;">
1357
- <label>Uppercase</label>
1470
+ <label>{{ isZh ? '全部大写' : 'Uppercase' }}</label>
1358
1471
  <el-switch v-model="localRecipe.textStyles.smallText.uppercase" />
1359
1472
  </div>
1360
1473
  </div>
1361
1474
  </el-collapse-item>
1362
1475
 
1363
1476
  <!-- Table -->
1364
- <el-collapse-item title="Table" name="table">
1477
+ <el-collapse-item :title="isZh ? '表格' : 'Table'" name="table">
1365
1478
  <div class="accordion-content" style="padding-top: 4px;">
1366
1479
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1367
- <label>Font family</label>
1480
+ <label>{{ isZh ? '字体' : 'Font family' }}</label>
1368
1481
  <el-select v-model="localRecipe.table.fontFamily" placeholder="SourceHanSansCN" size="default"
1369
1482
  style="width: 140px;" popper-class="style-select-popper">
1370
1483
  <el-option v-for="f in scannedFontOptions" :key="f.value" :label="f.label" :value="f.value">
@@ -1376,13 +1489,13 @@ function handlePickerChange(val: any) {
1376
1489
  </div>
1377
1490
 
1378
1491
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1379
- <label>Font size</label>
1492
+ <label>{{ isZh ? '字号' : 'Font size' }}</label>
1380
1493
  <el-input-number v-model="localRecipe.table.fontSize" :min="8" :max="72" controls-position="right"
1381
1494
  size="default" style="width: 90px;" />
1382
1495
  </div>
1383
1496
 
1384
1497
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1385
- <label>Background color</label>
1498
+ <label>{{ isZh ? '背景颜色' : 'Background color' }}</label>
1386
1499
  <div class="swatch-circle"
1387
1500
  :style="{ backgroundColor: localRecipe.table.bgColor || '#ffffff', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1388
1501
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.bgColor || '#ffffff', 'table.bgColor')">
@@ -1390,7 +1503,7 @@ function handlePickerChange(val: any) {
1390
1503
  </div>
1391
1504
 
1392
1505
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1393
- <label>Text color</label>
1506
+ <label>{{ isZh ? '文字颜色' : 'Text color' }}</label>
1394
1507
  <div class="swatch-circle"
1395
1508
  :style="{ backgroundColor: localRecipe.table.textColor || '#1e293b', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1396
1509
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.textColor || '#1e293b', 'table.textColor')">
@@ -1398,7 +1511,7 @@ function handlePickerChange(val: any) {
1398
1511
  </div>
1399
1512
 
1400
1513
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1401
- <label>Header color</label>
1514
+ <label>{{ isZh ? '表头背景色' : 'Header color' }}</label>
1402
1515
  <div class="swatch-circle"
1403
1516
  :style="{ backgroundColor: localRecipe.table.headerBg || '#5b21b6', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1404
1517
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.headerBg || '#5b21b6', 'table.headerBg')">
@@ -1406,7 +1519,7 @@ function handlePickerChange(val: any) {
1406
1519
  </div>
1407
1520
 
1408
1521
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1409
- <label>Header text color</label>
1522
+ <label>{{ isZh ? '表头文字色' : 'Header text color' }}</label>
1410
1523
  <div class="swatch-circle"
1411
1524
  :style="{ backgroundColor: localRecipe.table.headerTextColor || '#ffffff', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1412
1525
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.headerTextColor || '#ffffff', 'table.headerTextColor')">
@@ -1414,7 +1527,7 @@ function handlePickerChange(val: any) {
1414
1527
  </div>
1415
1528
 
1416
1529
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1417
- <label>Alternating background color</label>
1530
+ <label>{{ isZh ? '交替行背景色' : 'Alternating background color' }}</label>
1418
1531
  <div class="swatch-circle"
1419
1532
  :style="{ backgroundColor: localRecipe.table.alternateRowBg || 'transparent', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1420
1533
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.alternateRowBg || 'transparent', 'table.alternateRowBg')">
@@ -1422,7 +1535,7 @@ function handlePickerChange(val: any) {
1422
1535
  </div>
1423
1536
 
1424
1537
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1425
- <label>Alternating text color</label>
1538
+ <label>{{ isZh ? '交替行文字色' : 'Alternating text color' }}</label>
1426
1539
  <div class="swatch-circle"
1427
1540
  :style="{ backgroundColor: localRecipe.table.alternateTextColor || '#1e293b', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1428
1541
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.alternateTextColor || '#1e293b', 'table.alternateTextColor')">
@@ -1430,7 +1543,7 @@ function handlePickerChange(val: any) {
1430
1543
  </div>
1431
1544
 
1432
1545
  <div class="form-group flex-between" style="margin-bottom: 0;">
1433
- <label>Border color</label>
1546
+ <label>{{ isZh ? '边框颜色' : 'Border color' }}</label>
1434
1547
  <div class="swatch-circle"
1435
1548
  :style="{ backgroundColor: localRecipe.table.borderColor || '#ddd6fe', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1436
1549
  @click="(e) => openColorPickerForSwatch(e, localRecipe.table.borderColor || '#ddd6fe', 'table.borderColor')">
@@ -1440,10 +1553,10 @@ function handlePickerChange(val: any) {
1440
1553
  </el-collapse-item>
1441
1554
 
1442
1555
  <!-- Chart -->
1443
- <el-collapse-item title="Chart" name="chart">
1556
+ <el-collapse-item :title="isZh ? '图表' : 'Chart'" name="chart">
1444
1557
  <div class="accordion-content" style="padding-top: 4px;">
1445
1558
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1446
- <label>Font family</label>
1559
+ <label>{{ isZh ? '字体' : 'Font family' }}</label>
1447
1560
  <el-select v-model="localRecipe.chart.fontFamily" placeholder="SourceHanSansCN" size="default"
1448
1561
  style="width: 140px;" popper-class="style-select-popper">
1449
1562
  <el-option v-for="f in scannedFontOptions" :key="f.value" :label="f.label" :value="f.value">
@@ -1455,13 +1568,13 @@ function handlePickerChange(val: any) {
1455
1568
  </div>
1456
1569
 
1457
1570
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1458
- <label>Font size</label>
1571
+ <label>{{ isZh ? '字号' : 'Font size' }}</label>
1459
1572
  <el-input-number v-model="localRecipe.chart.fontSize" :min="8" :max="72" controls-position="right"
1460
1573
  size="default" style="width: 90px;" />
1461
1574
  </div>
1462
1575
 
1463
1576
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1464
- <label>Text color</label>
1577
+ <label>{{ isZh ? '文字颜色' : 'Text color' }}</label>
1465
1578
  <div class="swatch-circle"
1466
1579
  :style="{ backgroundColor: localRecipe.chart.labelColor || '#1e293b', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1467
1580
  @click="(e) => openColorPickerForSwatch(e, localRecipe.chart.labelColor || '#1e293b', 'chart.labelColor')">
@@ -1469,7 +1582,7 @@ function handlePickerChange(val: any) {
1469
1582
  </div>
1470
1583
 
1471
1584
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1472
- <label>Chart color</label>
1585
+ <label>{{ isZh ? '图表主色' : 'Chart color' }}</label>
1473
1586
  <div class="swatch-circle"
1474
1587
  :style="{ backgroundColor: localRecipe.chart.chartColor || localRecipe.styleColors?.[6] || '#6366f1', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1475
1588
  @click="(e) => openColorPickerForSwatch(e, localRecipe.chart.chartColor || localRecipe.styleColors?.[6] || '#6366f1', 'chart.chartColor')">
@@ -1477,14 +1590,13 @@ function handlePickerChange(val: any) {
1477
1590
  </div>
1478
1591
 
1479
1592
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1480
- <label>Palette</label>
1593
+ <label>{{ isZh ? '调色板' : 'Palette' }}</label>
1481
1594
  <el-select v-model="localRecipe.chart.paletteName" placeholder="Colorblind friendly"
1482
1595
  size="default" style="width: 140px;" popper-class="style-select-popper palette-select-popper"
1483
1596
  @change="handlePaletteChange">
1484
- <el-option v-for="p in PRESET_PALETTES" :key="p.name" :label="p.name" :value="p.name">
1597
+ <el-option v-for="p in PRESET_PALETTES" :key="p.name" :label="getPaletteDisplayLabel(p.name)" :value="p.name">
1485
1598
  <div style="display: flex; flex-direction: column; gap: 4px; padding: 4px 0; width: 100%;">
1486
- <span style="font-size: 13px; font-weight: 500; color: #1e293b; line-height: 1.2;">{{ p.name
1487
- }}</span>
1599
+ <span style="font-size: 13px; font-weight: 500; color: #1e293b; line-height: 1.2;">{{ getPaletteDisplayLabel(p.name) }}</span>
1488
1600
  <div style="display: flex; align-items: center; margin-top: 2px;">
1489
1601
  <span v-for="(color, cIdx) in p.colors" :key="cIdx" :style="{
1490
1602
  display: 'inline-block',
@@ -1503,7 +1615,7 @@ function handlePickerChange(val: any) {
1503
1615
  </div>
1504
1616
 
1505
1617
  <div class="form-group flex-between" style="margin-bottom: 0;">
1506
- <label>Axis color</label>
1618
+ <label>{{ isZh ? '坐标轴颜色' : 'Axis color' }}</label>
1507
1619
  <div class="swatch-circle"
1508
1620
  :style="{ backgroundColor: localRecipe.chart.gridColor || '#94a3b8', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1509
1621
  @click="(e) => openColorPickerForSwatch(e, localRecipe.chart.gridColor || '#94a3b8', 'chart.gridColor')">
@@ -1513,24 +1625,24 @@ function handlePickerChange(val: any) {
1513
1625
  </el-collapse-item>
1514
1626
 
1515
1627
  <!-- Shape -->
1516
- <el-collapse-item title="Shape" name="shape">
1628
+ <el-collapse-item :title="isZh ? '形状' : 'Shape'" name="shape">
1517
1629
  <div class="accordion-content" style="padding-top: 4px;">
1518
1630
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1519
- <label>Fill color</label>
1631
+ <label>{{ isZh ? '填充颜色' : 'Fill color' }}</label>
1520
1632
  <div class="swatch-circle"
1521
1633
  :style="{ backgroundColor: localRecipe.shape?.fillColor || localRecipe.styleColors[0] || '#ea580c', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1522
1634
  @click="(e) => openColorPickerForSwatch(e, localRecipe.shape?.fillColor || localRecipe.styleColors[0] || '#ea580c', 'shape.fillColor')">
1523
1635
  </div>
1524
1636
  </div>
1525
1637
  <div class="form-group flex-between" style="margin-bottom: 8px;">
1526
- <label>Border color</label>
1638
+ <label>{{ isZh ? '边框颜色' : 'Border color' }}</label>
1527
1639
  <div class="swatch-circle"
1528
1640
  :style="{ backgroundColor: localRecipe.shape?.borderColor || localRecipe.styleColors[1] || '#1e293b', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1529
1641
  @click="(e) => openColorPickerForSwatch(e, localRecipe.shape?.borderColor || localRecipe.styleColors[1] || '#1e293b', 'shape.borderColor')">
1530
1642
  </div>
1531
1643
  </div>
1532
1644
  <div class="form-group flex-between" style="margin-bottom: 0;">
1533
- <label>Text color</label>
1645
+ <label>{{ isZh ? '文字颜色' : 'Text color' }}</label>
1534
1646
  <div class="swatch-circle"
1535
1647
  :style="{ backgroundColor: localRecipe.shape?.textColor || '#ffffff', border: '1px solid #cbd5e1', cursor: 'pointer', flexShrink: 0 }"
1536
1648
  @click="(e) => openColorPickerForSwatch(e, localRecipe.shape?.textColor || '#ffffff', 'shape.textColor')">
@@ -1583,6 +1695,19 @@ function handlePickerChange(val: any) {
1583
1695
  </div>
1584
1696
  </el-tooltip>
1585
1697
  </div>
1698
+
1699
+ <!-- 新增主题样式按钮 (对应最右侧列表底部 + 入口) -->
1700
+ <el-tooltip placement="left" :content="isZh ? '新增主题样式' : 'Add Theme Style'" :show-after="50">
1701
+ <div class="theme-selector-card theme-add-card" @click="handleAddNewTheme">
1702
+ <div class="add-card-inner">
1703
+ <svg viewBox="0 0 24 24" width="18" height="18" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
1704
+ <line x1="12" y1="5" x2="12" y2="19" />
1705
+ <line x1="5" y1="12" x2="19" y2="12" />
1706
+ </svg>
1707
+ <span class="add-card-label">{{ isZh ? '新增' : 'Add' }}</span>
1708
+ </div>
1709
+ </div>
1710
+ </el-tooltip>
1586
1711
  </div>
1587
1712
  </div>
1588
1713
  </div>
@@ -1812,6 +1937,52 @@ function handlePickerChange(val: any) {
1812
1937
  border-left: 3.5px solid #6366f1;
1813
1938
  }
1814
1939
 
1940
+
1941
+ .theme-add-card {
1942
+ border: 1.5px dashed #94a3b8;
1943
+ background: #ffffff;
1944
+ color: #64748b;
1945
+ flex-shrink: 0;
1946
+ }
1947
+
1948
+ .theme-add-card:hover {
1949
+ border-color: #6366f1;
1950
+ background: #eef2ff;
1951
+ color: #6366f1;
1952
+ }
1953
+
1954
+ .add-card-inner {
1955
+ display: flex;
1956
+ flex-direction: column;
1957
+ align-items: center;
1958
+ justify-content: center;
1959
+ gap: 4px;
1960
+ width: 100%;
1961
+ height: 100%;
1962
+ }
1963
+
1964
+ .add-card-label {
1965
+ font-size: 11px;
1966
+ font-weight: 600;
1967
+ line-height: 1;
1968
+ }
1969
+
1970
+ .add-color-swatch-btn {
1971
+ display: flex;
1972
+ align-items: center;
1973
+ justify-content: center;
1974
+ border: 1.5px dashed #94a3b8 !important;
1975
+ background: #f8fafc;
1976
+ color: #64748b;
1977
+ box-shadow: none !important;
1978
+ }
1979
+
1980
+ .add-color-swatch-btn:hover {
1981
+ border-color: #6366f1 !important;
1982
+ color: #6366f1;
1983
+ background: #eef2ff;
1984
+ }
1985
+
1815
1986
  .card-inner-wrap {
1816
1987
  display: flex;
1817
1988
  flex-direction: column;