<template>
<el-button @click="handleClick('online')"></el-button>
</template>
<script lang="ts" setup>
import { useRouter } from 'vue-router'
const router = useRouter()
const handleClick = (name: string) => router.push({ name })
</script>
Vite Vue3 Ts router 路由点击跳转
最新推荐文章于 2024-07-17 20:15:37 发布