diff --git a/src/components/subtitle/KeywordEffectsSettings.vue b/src/components/subtitle/KeywordEffectsSettings.vue
index 15d6f1a..75fa5cb 100644
--- a/src/components/subtitle/KeywordEffectsSettings.vue
+++ b/src/components/subtitle/KeywordEffectsSettings.vue
@@ -1,8 +1,24 @@
@@ -49,10 +186,7 @@ const groups = computed(() => config.value.keywordGroupsStyles || []);
config.value.keywordGroupsStyles || []);
-
关键词分组({{ groups.length }})
-
+
关键词分组管理
+
+
+
+
+
已有分组 ({{ groups.length }})
+
-
{{ group.groupName || `分组 ${i + 1}` }}
-
- 强调字体:{{ group.styleOverride.fontName }} ·
- {{ group.styleOverride.fontColor || group.color }}
+
+
+
+ {{ group.groupName || `分组 ${i + 1}` }}
+
+
+
+
+
+
+
+
+
+
+
关键词 ({{ groupKeywords(group).length }})
+
+
+
+
暂无关键词
+
+
+
+
+
+
+
+
分组样式
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ group.styleOverride.outlineWidth }}px
+
+
+
+
+
+ 示例关键词
+
-
分组样式编辑与关键词标记将在后续版本开放
+
+
+
+
+
+
+
diff --git a/src/components/subtitle/SubtitleStyleSelector.vue b/src/components/subtitle/SubtitleStyleSelector.vue
index 516f3fe..93ded31 100644
--- a/src/components/subtitle/SubtitleStyleSelector.vue
+++ b/src/components/subtitle/SubtitleStyleSelector.vue
@@ -58,6 +58,13 @@ const noBackground = computed({
},
});
+const shadowBlurPreview = computed({
+ get: () => subtitleStyle.value?.shadowBlur ?? 4,
+ set: (value) => {
+ if (subtitleStyle.value) subtitleStyle.value.shadowBlur = value;
+ },
+});
+
const previewStyle = computed(() =>
buildSubtitlePreviewBoxStyle(subtitleStyle.value),
);
@@ -189,6 +196,24 @@ function applyPreset(preset) {
+
+
+
+
+
+ {{ shadowBlurPreview }}px
+
+
+
+ 注:FFmpeg 不支持阴影模糊,实际视频中仅显示阴影偏移效果
+
+
diff --git a/src/components/subtitle/TitleLineStyleEditor.vue b/src/components/subtitle/TitleLineStyleEditor.vue
index e3381ae..e148230 100644
--- a/src/components/subtitle/TitleLineStyleEditor.vue
+++ b/src/components/subtitle/TitleLineStyleEditor.vue
@@ -20,6 +20,13 @@ const enableBackground = computed({
},
});
+const backgroundOpacityPercent = computed({
+ get: () => Math.round((Number(line.value.backgroundOpacity) || 0) * 100),
+ set: (value) => {
+ line.value.backgroundOpacity = Math.max(0, Math.min(100, Number(value) || 0)) / 100;
+ },
+});
+
const enableShadow = computed({
get: () => (line.value.shadowOffset ?? 0) > 0,
set: (on) => {
@@ -44,7 +51,7 @@ const previewStyle = computed(() => {
}
return {
fontFamily: line.value.fontName ? `'${line.value.fontName}'` : "优设标题黑",
- fontSize: `${Math.min(Number(line.value.fontSize) || 80, 48)}px`,
+ fontSize: `${Number(line.value.fontSize) || 80}px`,
color: line.value.fontColor || "#fff",
backgroundColor:
enableBackground.value && line.value.backgroundColor !== "transparent"
@@ -52,6 +59,8 @@ const previewStyle = computed(() => {
: "transparent",
textShadow: shadows.join(", ") || "none",
padding: "8px 16px",
+ display: "inline-block",
+ lineHeight: 1.12,
};
});
@@ -108,6 +117,22 @@ const previewStyle = computed(() => {
启用背景
+
+
+
+
+
+
+ {{ backgroundOpacityPercent }}%
+
+
+
@@ -116,17 +141,26 @@ const previewStyle = computed(() => {
启用阴影
-
-
-
-
+
+
+
+
+ {{ line.shadowOffset }}
+
+
+
+
+
+
效果预览
-
- {{ line.text || "标题文字" }}
+
+
+ {{ line.text || "标题文字" }}
+
diff --git a/src/components/subtitle/TitleSubtitleSettings.vue b/src/components/subtitle/TitleSubtitleSettings.vue
index 210caba..0415126 100644
--- a/src/components/subtitle/TitleSubtitleSettings.vue
+++ b/src/components/subtitle/TitleSubtitleSettings.vue
@@ -1,5 +1,5 @@
@@ -57,36 +70,48 @@ const linePreviews = computed(() => titleConfig.value?.lines || []);
-