|
@@ -34,6 +34,11 @@ export default defineComponent({
|
|
|
}).filter(Boolean)
|
|
|
})
|
|
|
|
|
|
+ const partIndex = computed(() => {
|
|
|
+ const partIndex = partListNames.value.findIndex((item: any) => item.value === state.partIndex)
|
|
|
+ return partIndex > -1 ? partIndex : 0
|
|
|
+ })
|
|
|
+
|
|
|
const switchMusic = (index: number) => {
|
|
|
// 暂停播放
|
|
|
RuntimeUtils.pause()
|
|
@@ -65,9 +70,10 @@ export default defineComponent({
|
|
|
return () => (
|
|
|
<Popup class={styles.popup} v-model:show={toggleMusicSheet.show}>
|
|
|
<ChoosePartName
|
|
|
- partIndex={state.partIndex || 0}
|
|
|
+ partIndex={partIndex.value}
|
|
|
partListNames={partListNames.value}
|
|
|
onClose={(value) => {
|
|
|
+ console.log("🚀 ~ value:", value)
|
|
|
toggleMusicSheet.show = false
|
|
|
if (value !== undefined) {
|
|
|
switchMusic(value)
|