23.页面跳转的基本写法

<template>
    <div class="app-container">
        save
        <el-button type="primary" plain @click="test()">主要按钮</el-button>
    </div>
</template>

<script>
export default {
    data() {
        return {

        }
    },
    created: {

    },
    methods: {
        test() {
            this.$router.push({path:'/teacher/table'});
        }
    }

}
</script>

路由是单独文件定义

发布了253 篇原创文章 · 获赞 10 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/gunsmoke/article/details/105453436