<template>
    <meting-js
      ref="metingjs"
      :id="search"
      :key="key"
      :server="platform"
      :type="type"
    />
  </template>
  
  <script setup>
  import { ref, onBeforeUnmount, onMounted } from "vue";
  import bus from "./../utils/bus.js";
  
  let search = ref("");
  let platform = ref("netease");
  let key = ref(0);
  let type = ref("search");
  let metingjs = ref(null);
  
  function searchNewValue(searchObj) {
    search.value = searchObj.search;
    platform.value = searchObj.platform;
    key.value = new Date().getTime();
    type.value = searchObj.type;
  }
  
  bus.on("searchNewValue", searchNewValue);
  onBeforeUnmount(() => {
    bus.off("searchNewValue");
  });
  //歌词全屏显示
  // document.querySelector(".aplayer-lrc").requestFullscreen();
  // aplayer-info音乐信息
  //document.querySelector(".aplayer-info").requestFullscreen();
  </script>
  