其他分享
首页 > 其他分享> > vue新增路由与页面跳转

vue新增路由与页面跳转

作者:互联网

router/index.vue

{
  path: '/order',
  component: Layout,
  name: 'optimize',
  hidden: true,
  redirect: '/order',
  children: [{
    path: 'optimizeDetail/:orderId/:id',
    component: (resolve) => require(['@/views/manufacture/order/optimizeDetail'], resolve),
    name: '优化单详情',
    meta: { title: '优化单详情' },

  }]
},

跳转

<template slot-scope="scope">
          <el-button
            size="mini"
            type="text"
            @click="() => { $router.push({ path: `/order/optimizeDetail/${orderId}/${scope.row.id}` }) }"
            icon="el-icon-tickets"
            >详情</el-button
          >
        </template>

接收参数

export default {
  name: "detail",
  components: { BreadcrumbSub },
  data() {
    return {
      orderId: this.$route.params.orderId,
      id: this.$route.params.id,

 

标签:orderId,vue,optimizeDetail,name,id,跳转,path,order,路由
来源: https://www.cnblogs.com/jqynr/p/16283277.html