重开一个组件再写当前播放完成
This commit is contained in:
@@ -1,10 +1,20 @@
|
||||
<script setup>
|
||||
import { ref, defineProps, onUnmounted, onDeactivated } from "vue";
|
||||
import { useRouter } from "vue-router";
|
||||
|
||||
const props = defineProps({ artists: Array, onLeave: Function });
|
||||
const router = useRouter()
|
||||
// console.log(props.artists);
|
||||
|
||||
const click = (id) => {
|
||||
props.onLeave?.()
|
||||
router.push('/singer/' + id)
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<template v-for="(ar, idx) of artists" key="idx">
|
||||
<span
|
||||
@click="$router.push('/singer/' + ar.id)"
|
||||
@click="click(ar.id)"
|
||||
style="margin-right: 4px; cursor: pointer"
|
||||
>{{ ar.name }}</span
|
||||
>
|
||||
@@ -12,9 +22,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ["artists"],
|
||||
};
|
||||
// export default {
|
||||
// props: ["artists"],
|
||||
// };
|
||||
</script>
|
||||
|
||||
<style></style>
|
||||
|
||||
Reference in New Issue
Block a user