diff --git a/src/lang/package/en.ts b/src/lang/package/en.ts index 908d56c..c0fa681 100644 --- a/src/lang/package/en.ts +++ b/src/lang/package/en.ts @@ -34,7 +34,8 @@ export default { oldPwd:'Old Password', confirmNewPwd:'Confirm new password', confirm:'Confirm', - gohome:'Back to home page' + gohome:'Back to home page', + SMSCode:'SMS Code', }, // 导航栏国际化 @@ -89,6 +90,9 @@ export default { fontFamily:'Font Faily', XAxis:"X-axis", YAxis:"Y-axis", + rows:"Row Number", + rows1:"Single", + rows2:"Double", fontSize:"Font Size", width:"Width", FontColor:"Font Color", diff --git a/src/lang/package/zh-cn.ts b/src/lang/package/zh-cn.ts index f5e6178..ac4486f 100644 --- a/src/lang/package/zh-cn.ts +++ b/src/lang/package/zh-cn.ts @@ -34,7 +34,8 @@ export default { oldPwd:'旧密码', confirmNewPwd:'确认新密码', confirm:'确定', - gohome:'回到首页' + gohome:'回到首页', + SMSCode:'短信验证码', }, // 导航栏国际化 @@ -87,6 +88,9 @@ export default { fontFamily:'字体', XAxis:"X轴", YAxis:"Y轴", + rows:"单双行", + rows1:"单行", + rows2:"双行", fontSize:"字体大小", width:"宽度", FontColor:"字体颜色", diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 9ea2d5d..e5c7bdb 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -2,6 +2,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElForm: typeof import('element-plus/es')['ElForm'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] @@ -270,6 +271,7 @@ import { UnwrapRef } from 'vue' declare module 'vue' { interface ComponentCustomProperties { readonly EffectScope: UnwrapRef + readonly ElForm: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef readonly asyncComputed: UnwrapRef diff --git a/src/views/createVideo/index.vue b/src/views/createVideo/index.vue index 70af472..7c7bc27 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -31,15 +31,23 @@ /> -
{{$t('createVideo.YAxis')}}: {{$t('createVideo.YAxis')}}: 
-
{{$t('createVideo.XAxis')}}: {{$t('createVideo.XAxis')}}: 
+ +
{{$t('createVideo.rows')}}: 
{{$t('createVideo.fontSize')}}: 
{{$t('createVideo.SubtitlesTip')}}
+
{{$t('createVideo.SubtitlesTip')}}
@@ -103,7 +112,7 @@
-
+
@@ -1446,6 +1455,16 @@ async function uploadProgress(videoId, isSaveVideo) { speakTypeStr: soundStyle.value, //声音风格 voiceMouldId: sound.value, //选择声音id voiceFrom=1 时必传 voiceMaterialId: afterSaveAudioId.value, //上传音频且保存音频后得到的id voiceFrom=2 时必传 + // subtitleEnabled:SubtitlesSwitch.value?1:0 , //字幕开关 + // subtitleParams:{ + // Fontname:SubtitlesFontFamily.value, + // Fontsize:SubtitlesSize.value, + // Boxwidth:SubtitlesWidth.value, + // // Boxheight:Number(SubtitlesSize.value+10), + // Boxheight:SubtitlesBox.value.style.height, + // SecondaryColour:SubtitlesColorBGRA.value, + // Marginl:SubtitlesLeft.value, + // } }; try { const res3 = await saveOrUpdateApi(saveOrUpdateData); // 保存数据 @@ -2002,6 +2021,7 @@ const canvasImgBox = ref(null); // 图片外盒子dom const SubtitlesFontFamily = ref(""); //字幕字体系列 const SubtitlesTop = ref(400); // 字幕Y轴 const SubtitlesLeft = ref(100); // 字幕X轴 + const SubtitlesRow = ref(false); // 字幕单双行 const SubtitlesSize = ref(18); // 字幕字号 const isRotating = ref(false); //控制是否旋转 const rotationStartAngle = ref(0); //旋转中间件 @@ -2183,7 +2203,7 @@ watch( startX.value = event.clientX; } }; - //旋转盒子 + //旋转盒子 暂时弃用 const startRotation = (event) => { isRotating.value = true; isResizing.value = true; @@ -2202,7 +2222,7 @@ watch( const SubtitlesBoxCenterX = SubtitlesBox.value.offsetLeft + SubtitlesBox.value.offsetWidth / 2; const SubtitlesBoxCenterY = SubtitlesBox.value.offsetTop + SubtitlesBox.value.offsetHeight / 2; const mouseAngle = Math.atan2(event.clientY - SubtitlesBoxCenterY, event.clientX - SubtitlesBoxCenterX); - SubtitlesAngle.value = (mouseAngle - rotationStartAngle.value)*5; + SubtitlesAngle.value = (mouseAngle - rotationStartAngle.value); SubtitlesBox.value.style.transform = `rotate(${SubtitlesAngle.value}rad)`; } }; @@ -2295,6 +2315,7 @@ onUnmounted(() => { } }); //#endregion ---------------------- +