首先先写一个点击事件,触发它,这里用的this.$router.push()进行跳转,需要有vue的基础才能看的懂,在这里抱歉了,并不是新手教学
<el-button size="mini" type="text" icon="el-icon-edit" @click="details()" >详情</el-button>
method里面写他的点击事件方法
details(){ alert("去跳转") this.$router.push("/details") },
使用路由进行跳转,到这里就实现了跳转,希望可以帮助到各位小伙伴
{ path: '/details', name: 'details', component: () => import('../views/plm/details/index') },
这是其中一种,还有更为方便的跳转方式
toTitle(e){ alert("跳转") this.$router.push({ path: '/plm/title', query: { row: e } }) },
这种方式不需要配置路由,直接跳转过去了,比上面方式更为方便。希望可以帮助到各位小伙伴
那参数就更简单了,只需要一句话就可以拿到所有参数
name: "Title", data() { return { titleID:null, }; }, created() { this.titleID = this.$route.query.row; }, methods: { }