From 2f426e462b701c61ecbb5c15246026292bf3dd3f Mon Sep 17 00:00:00 2001 From: congzc Date: Wed, 28 Jun 2023 17:06:21 +0800 Subject: [PATCH] 2 --- src/types/auto-imports.d.ts | 2 ++ src/views/createVideo/index.vue | 12 ++++++------ src/views/myStore/index.vue | 19 +++++++++++-------- 3 files changed, 19 insertions(+), 14 deletions(-) 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 01971ac..9585416 100644 --- a/src/views/createVideo/index.vue +++ b/src/views/createVideo/index.vue @@ -340,10 +340,10 @@ item.sex == 1 ? lanChange == 'zh-cn' ? `男 ` - : `man` + : `male` : lanChange == 'zh-cn' ? `女` - : `woman` + : `female` })` " :value="item.id" @@ -1025,12 +1025,12 @@ async function getPreviewAudio() { } previewAudioUrl.value = res.data.data; let audioA = document.getElementById("audio"); - audioA.addEventListener("loadedmetadata", function () { + audioA.addEventListener("loadedmetadata", async () => { audioA.muted = false; // 将 muted 属性设置为 false - audioA.play(); + await audioA.play(); + previewAudioLoading.value = false; + console.log(audioA.muted, "播放了"); }); - - previewAudioLoading.value = false; } catch (error) { ElMessage.error( lanChange.value == "zh-cn" diff --git a/src/views/myStore/index.vue b/src/views/myStore/index.vue index 91f3d0c..ecea213 100644 --- a/src/views/myStore/index.vue +++ b/src/views/myStore/index.vue @@ -15,12 +15,12 @@
{{ lanChange == "zh-cn" ? item.typeDesc : item.englishName }}
-
- {{ - lanChange == "zh-cn" ? item.rmb + "¥" : item.dollar + "$" - }}/{{ item.validityDuration }}{{ $t("shop.day") }} -
+ +
+ {{ + lanChange == "zh-cn" ? item.rmb + "¥" : item.dollar + "$" + }}/{{ item.validityDuration }}{{ $t("shop.day") }}
{{ item.credit }} { .title { font-size: 30px; font-weight: 700; - // line-height: 25px; + width: 100%; margin-bottom: 10px; cursor: pointer; + text-align: center; .el-icon { line-height: 30px; width: 40px; @@ -409,6 +410,7 @@ onMounted(async () => { font-size: 20px; color: #7c7c7a; cursor: pointer; + text-align: end; .price { font-size: 30px; font-weight: 700; @@ -417,7 +419,7 @@ onMounted(async () => { } } .time { - text-align: center; + text-align: end; margin-bottom: 10px; font-size: 20px; color: #7c7c7a; @@ -427,6 +429,7 @@ onMounted(async () => { font-weight: 700; color: #242625; cursor: pointer; + margin-right: 5px; } }