Skip to content

Routing > See/Change Meta and Props values #1031

Open
@TheJaredWilcurt

Description

@TheJaredWilcurt

What problem does this feature solve?

We have stuff like this in our @/routes/index.js:

{
  path: '/labs/:id',
  name: 'labDetails',
  component: LabDetails,
  props: (route) => ({
    id: route.params.id
  }),
  meta: {
    permission: 'readWriteDeleteLabs',
    showModal: false
  },
  children: [
    {
      path: 'reservation',
      name: 'labReservations',
      meta: {
        permission: 'readWriteDeleteLabs',
        showModal: false
      }
    },
    {
      path: 'reservation/:reservationId',
      name: 'labReservation',
      components: {
        modalBody: LabReservationDetails
      },
      meta: {
        permission: 'readWriteDeleteLabReservations',
        showModal: true
      }
    }
  ]
}

But the Vue-DevTools only shows path and name. It would be useful to be able to see the values for props and meta. It would be even better if you could change these values. We have our modal's visibility tied to

computed: {
  showModal: function () {
    return this.$route.meta.showModal;
  }
}

So being able to toggle the value in Meta lets me change the state of the component.

What does the proposed API look like?

.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions