NickMcBurney / storybook-vue3-router

A Storybook decorator that allows you to use Vue 3 / vue-router@4 routing-aware components.
MIT License
29 stars 8 forks source link

Pass several key/value parameters to the mockRouter #60

Open prodigy7 opened 11 months ago

prodigy7 commented 11 months ago

Currently I've following story:

import vProductStart from './vProductStart.vue';
import { mockRouter } from 'storybook-vue3-router'

export default {
  component: vProductStart,
  decorators: [
    mockRouter({
      meta: ['some_meta'],
      params: ['some_param'],
      query: ['some_query']
    })
  ]
};

export const Default = {
  args: {
  }
};

Now i need to pass following parameter (params):

{ "type": "custom", "projectId": "1", "tab": "products", "vProduct": "1" }

But my IDE tells my directly, that this type is not accepted. Somehow the it seems to me, it isn't possible? Could it be?