From 80476fae71f08bf4408c7509eff254031a4eeac6 Mon Sep 17 00:00:00 2001 From: inleft <inleft@qq.com> Date: Wed, 24 Aug 2022 18:47:09 +0800 Subject: [PATCH] 路由修正,常量提取 --- src/components/mini/Aplayer.vue | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/components/mini/Aplayer.vue b/src/components/mini/Aplayer.vue index 42c0fb9..9421d4d 100644 --- a/src/components/mini/Aplayer.vue +++ b/src/components/mini/Aplayer.vue @@ -1,7 +1,8 @@ <template> <div class="fade"> <a-col v-bind="colMain"> - <aplayer :audio="audio" :autoplay="autoplay" fixed style="z-index: 10;" :volume="0.1" :preload="preload" /> + <aplayer ref="myAplayer" :audio="audio" :autoplay="autoplay" fixed style="z-index: 10;" :volume="0.1" + :preload="preload" /> </a-col> <!-- <a-modal ref="musicModal" title="" :dialog-style="{ top: '10px' }" :mask="false" @@ -15,7 +16,12 @@ import APlayer from '@moefe/vue-aplayer'; export default { - + created() { + this.$nextTick(function() { + this.$message.info("stop..") + this.$refs.myAplayer.pause(); + }) + }, data() { return { colMain: { -- Gitblit v1.9.1