封装背景音乐功能

This commit is contained in:
Andy Leong
2024-01-12 00:33:19 +08:00
parent de023d9c2e
commit 2feefb2c38
5 changed files with 1461 additions and 15 deletions

View File

@@ -7,12 +7,11 @@
</template>
<script setup>
import gsap from 'gsap'
import gsap from "gsap";
import Loading from "@/components/Loading";
import Index from "@/components/Index";
import Question from "@/components/Question";
import { bgm } from '@/plugins'
import { bgm } from "@/plugins";
const showLoad = ref(false);
const loadFn = (item) => {
@@ -36,9 +35,8 @@ const questionFn = (item) => {
}
};
onMounted(() => {
bgm()
bgm();
});
</script>
@@ -48,6 +46,12 @@ onMounted(() => {
background-color: rgb(255, 255, 255);
}
#musicBtn {
@include pos(60px, 60px, 80px, 40px);
@include bg_pos("music-icon.png");
z-index: 99;
}
.home {
@include box(750px, 100vh);
// position: relative;