<template>
  <div>
    <!-- <p>电影{{$route.params.id}}页面</p> -->
    <p>电影{{id}}页面</p>
    <button @click="goBack">后退</button>
    <button @click="goto">前进</button>
  </div>
  
</template>

<script setup>
// 获取路由参数
    import {useRouter} from 'vue-router'
    const router = useRouter()
    const props = defineProps({
      id:String
    })
    
    const goBack = () => {
      router.go(-1)
    }

    const goto = () => {
      router.go(1)
    }
  
</script>

<style>

</style>