English 中文(简体)
how to route with meta data in vue route
原标题:

I am using vue-router to route my app.I want to route with some meta data.I have this in my index.js for route config.

  {
      path:  /column/:id ,
      name:  columnDetail ,
      meta: {
        specialColumnName: "hello"
      },
      component: () => import( ../views/SpecialColumnDetailPage/specialColumnDetailPage.vue ),
    },

I use this method to navigate to /column/:id.

 router.push({
    path: `column/${specialColumnId}`,
    meta: {
      specialColumnName:  test ,
      hello:  world ,
    },
  });

But when I want to get specialColumnName in specialColumnDetailPage component.I always get hello instead of test.I want to pass specialColumnName to component when I navigate to specialColumnDetailPage compnent.
here is the log of router.currentRoute.value.meta. enter image description here

问题回答

暂无回答




相关问题
how to route with meta data in vue route

I am using vue-router to route my app.I want to route with some meta data.I have this in my index.js for route config. { path: /column/:id , name: columnDetail , meta: { ...

Vue3 webcam typescript support

i m looking for component webcam for my vue3 project, currently i found https://www.npmjs.com/package/vue-camera-lib this package, but the problem is this package don t support typescript, i got this ...

Problem with publishing tools is laravel nova

Laravel 10, nova 4.25.1. I have a problem with publishing tools. I create according to the documentation. I register in the provider, specify in fields, run npm run dev, prod, watch. Nothing helps and ...

Vue3 Cleave js not working if not using v-model.lazy

Currently i try to use cleavejs to formatting thousand separator my input number, it s show strange behavior when i input 1000.123 it show 1,000.12 which is correct format, but my v-model value is ...

热门标签