GamePortrait/node_modules/.cache/babel-loader/4e9412be344ccf23c5cdf42b97152e7d9e4727e28081a5a74a5d715fc0fbc220.json

1 line
13 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{"ast":null,"code":"/* eslint-disable */\nimport APlayer from \"aplayer\";\nimport { nextTick, onMounted, computed, watch } from \"vue\";\nimport { getAppMusic } from \"@/utils/api\";\nimport { useStore } from \"vuex\";\nexport default {\n name: \"confirmBet\",\n components: {},\n props: {\n data: {\n type: Object,\n default: () => ({\n show: false\n })\n }\n },\n setup() {\n const store = useStore();\n const musicVolume = computed(() => store.state.config.musicVolume);\n const volume = computed(() => store.state.config.volume);\n let player = null;\n onMounted(() => {\n nextTick(() => {\n // const list = [\n // {\n // name: \"We Cant Stop\", //歌名\n // artist: \"Miley Cyrus - Berlin Tag Und Nacht Vol.4\", //歌手\n // url: require(\"../assets/mp3/2023520.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/2023520.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Peter Pan Was Right\", //歌名\n // artist: \"Anson Seabra - Peter Pan Was Right\", //歌手\n // url: require(\"../assets/mp3/4138042894.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/4138042894.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Shape of You\", //歌名\n // artist: \"Ed Sheeran - Shape of You\", //歌手\n // url: require(\"../assets/mp3/3197545262.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/3197545262.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Unstoppable\", //歌名\n // artist: \"Sia - This Is Acting (Deluxe Version)\", //歌手\n // url: require(\"../assets/mp3/6005971CUY6.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/6005971CUY6.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Bones\", //歌名\n // artist: \"Imagine Dragons - Bones\", //歌手\n // url: require(\"../assets/mp3/680637476.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/680637476.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Someone Like You\", //歌名\n // artist: \"Adele - 21 (Explicit)\", //歌手\n // url: require(\"../assets/mp3/2591806824.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/2591806824.webp\"), //音乐封面地址\n // lrc: \"\"\n // }\n // ]\n\n // 音乐文件\n getAppMusic(\"/music.json\").then(res => {\n if (res.list && res.list.length > 0) {\n init(res.list);\n } else {\n console.warn(\"音乐列表文件不存在\");\n }\n }).catch(err => {\n console.log(err);\n });\n });\n });\n const init = list => {\n player = new APlayer({\n container: document.getElementById(\"aPlayer\"),\n mini: false,\n audio: list,\n listFolded: false,\n listMaxHeight: \"8rem\"\n });\n store.commit(\"app/musicPlayer\", player);\n player.on(\"play\", function () {\n if (musicVolume.value == false) {\n store.commit(\"config/setValue\", {\n name: \"musicVolume\",\n type: true\n });\n }\n });\n player.on(\"pause\", function () {\n if (musicVolume.value == true) {\n // console.log(\"pause\")\n store.commit(\"config/setValue\", {\n name: \"musicVolume\",\n type: false\n });\n }\n });\n player.pause();\n player.play();\n };\n watch(() => [musicVolume.value], ([type]) => {\n if (player) {\n nextTick(() => {\n if (type) {\n player.volume(volume.value.music / 100, true);\n player.play();\n } else {\n player.volume(volume.value.music / 100, false);\n player.pause();\n }\n });\n }\n }, {\n deep: true\n });\n watch(() => [volume.value.music], ([value]) => {\n if (player) {\n nextTick(() => {\n player.volume(value / 100, true);\n });\n }\n }, {\n immediate: true,\n deep: true\n });\n }\n};","map":{"version":3,"names":["APlayer","nextTick","onMounted","computed","watch","getAppMusic","useStore","name","components","props","data","type","Object","default","show","setup","store","musicVolume","state","config","volume","player","then","res","list","length","init","console","warn","catch","err","log","container","document","getElementById","mini","audio","listFolded","listMaxHeight","commit","on","value","pause","play","music","deep","immediate"],"sources":["/Users/li/Desktop/work/work2/OG/GamePortrait/src/components/aPlayer.vue"],"sourcesContent":["<template>\n <div id=\"aPlayer\"></div>\n</template>\n<script>\n/* eslint-disable */\nimport APlayer from \"aplayer\"\nimport { nextTick, onMounted, computed, watch } from \"vue\"\nimport { getAppMusic } from \"@/utils/api\"\nimport { useStore } from \"vuex\"\nexport default {\n name: \"confirmBet\",\n components: {},\n props: {\n data: {\n type: Object,\n default: () => ({\n show: false\n })\n }\n },\n setup() {\n const store = useStore()\n const musicVolume = computed(() => store.state.config.musicVolume)\n const volume = computed(() => store.state.config.volume)\n let player = null\n onMounted(() => {\n nextTick(() => {\n // const list = [\n // {\n // name: \"We Cant Stop\", //歌名\n // artist: \"Miley Cyrus - Berlin Tag Und Nacht Vol.4\", //歌手\n // url: require(\"../assets/mp3/2023520.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/2023520.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Peter Pan Was Right\", //歌名\n // artist: \"Anson Seabra - Peter Pan Was Right\", //歌手\n // url: require(\"../assets/mp3/4138042894.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/4138042894.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Shape of You\", //歌名\n // artist: \"Ed Sheeran - Shape of You\", //歌手\n // url: require(\"../assets/mp3/3197545262.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/3197545262.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Unstoppable\", //歌名\n // artist: \"Sia - This Is Acting (Deluxe Version)\", //歌手\n // url: require(\"../assets/mp3/6005971CUY6.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/6005971CUY6.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Bones\", //歌名\n // artist: \"Imagine Dragons - Bones\", //歌手\n // url: require(\"../assets/mp3/680637476.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/680637476.webp\"), //音乐封面地址\n // lrc: \"\"\n // },\n // {\n // name: \"Someone Like You\", //歌名\n // artist: \"Adele - 21 (Explicit)\", //歌手\n // url: require(\"../assets/mp3/2591806824.mp3\"), //音频文件地址\n // cover: require(\"../assets/mp3/cover/2591806824.webp\"), //音乐封面地址\n // lrc: \"\"\n // }\n // ]\n\n // 音乐文件\n getAppMusic(\"/music.json\")\n .then((res) => {\n if (res.list && res.list.length > 0) {\n init(res.list)\n } else {\n console.warn(\"音乐列表文件不存在\")\n }\n })\n .catch((err) => {\n console.log(err)\n })\n })\n })\n const init = (list) => {\n player = new APlayer({\n container: document.getElementById(\"aPlayer\"),\n mini: false,\n audio: list,\n listFolded: false,\n listMaxHeight: \"8rem\"\n })\n store.commit(\"app/musicPlayer\", player)\n player.on(\"play\", function () {\n if (musicVolume.value == false) {\n store.commit(\"config/setValue\", {\n name: \"musicVolume\",\n type: true\n })\n }\n })\n player.on(\"pause\", function () {\n if (musicVolume.value == true) {\n // console.log(\"pause\")\n store.commit(\"config/setValue\", {\n name: \"musicVolume\",\n type: false\n })\n }\n })\n player.pause()\n player.play()\n }\n watch(\n () => [musicVolume.value],\n ([type]) => {\n if (player) {\n nextTick(() => {\n if (type) {\n player.volume(volume.value.music / 100, true)\n player.play()\n } else {\n player.volume(volume.value.music / 100, false)\n player.pause()\n }\n })\n }\n },\n { deep: true }\n )\n watch(\n () => [volume.value.music],\n ([value]) => {\n if (player) {\n nextTick(() => {\n player.volume(value / 100, true)\n })\n }\n },\n { immediate: true, deep: true }\n )\n }\n}\n</script>\n<style lang=\"scss\">\n@import \"APlayer/dist/APlayer.min\";\n.aplayer {\n transform: rotateX(0deg);\n}\n.aplayer .aplayer-icon {\n width: 22px;\n height: 22px;\n margin: 0 4px;\n}\n.aplayer-controller {\n align-items: center;\n}\n.aplayer.aplayer-arrow .aplayer-icon-loop,\n.aplayer.aplayer-arrow .aplayer-icon-order {\n display: inline-block;\n}\n.aplayer .aplayer-icon-volume-down {\n display: none;\n}\n.aplayer .aplayer-info .aplayer-music {\n line-height: 20px;\n display: flex;\n margin-bottom: 10px;\n width: calc(100% - 40px);\n span:last-child {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n }\n .aplayer-title {\n padding-right: 10px;\n }\n}\n</style>\n"],"mappings":"AAIA;AACA,OAAOA,OAAM,MAAO,SAAQ;AAC5B,SAASC,QAAQ,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,KAAI,QAAS,KAAI;AACzD,SAASC,WAAU,QAAS,aAAY;AACxC,SAASC,QAAO,QAAS,MAAK;AAC9B,eAAe;EACbC,IAAI,EAAE,YAAY;EAClBC,UAAU,EAAE,CAAC,CAAC;EACdC,KAAK,EAAE;IACLC,IAAI,EAAE;MACJC,IAAI,EAAEC,MAAM;MACZC,OAAO,EAAEA,CAAA,MAAO;QACdC,IAAI,EAAE;MACR,CAAC;IACH;EACF,CAAC;EACDC,KAAKA,CAAA,EAAG;IACN,MAAMC,KAAI,GAAIV,QAAQ,EAAC;IACvB,MAAMW,WAAU,GAAId,QAAQ,CAAC,MAAMa,KAAK,CAACE,KAAK,CAACC,MAAM,CAACF,WAAW;IACjE,MAAMG,MAAK,GAAIjB,QAAQ,CAAC,MAAMa,KAAK,CAACE,KAAK,CAACC,MAAM,CAACC,MAAM;IACvD,IAAIC,MAAK,GAAI,IAAG;IAChBnB,SAAS,CAAC,MAAM;MACdD,QAAQ,CAAC,MAAM;QACb;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACAI,WAAW,CAAC,aAAa,EACtBiB,IAAI,CAAEC,GAAG,IAAK;UACb,IAAIA,GAAG,CAACC,IAAG,IAAKD,GAAG,CAACC,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