report.ts 337 B

1234567891011121314151617
  1. import { defineStore } from "pinia";
  2. import { Song } from "@/types/song";
  3. export const useReportStore = props => {
  4. const { modalUuid } = props;
  5. if (!modalUuid) return null;
  6. return defineStore(`report-${modalUuid}`, {
  7. state: () => ({
  8. song: <Song>{}
  9. }),
  10. actions: {
  11. init({ song }) {
  12. this.song = song;
  13. }
  14. }
  15. })();
  16. };