bhuh12 / vue-router-tab

Vue.js tab components, based on Vue Router.

Home Page:https://bhuh12.github.io/vue-router-tab/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Passing Props

mwasigala opened this issue · comments

Using default tabs configuration

props cannot be passed to individual tabs
it says undefined
below is the template i used to add default tabs, the tabs are added but the props are undefined

{ to: { name: "componentname", params: { data: this.data} } }

to is used to set the access route when the tab is activated。
You should check the value of this.data.

this.data is a json string...

How does one pass props to the tabs?!

which props?

how to pass data from the frame to the tabs

i have a json data and i want to pass it to one of the tabs

to pass data between components i use props in vue js

Maybe you need vuex

i do not need the vuex store.. for now..
What i want is to pass data to the component which is one of the tabs,
is it possible for me to pass data using props of the vue component or not?

According to your documentation router-tab is a component in which you can bind tabs, and those tabs are components,
I want to pass data to the tabs through props ("props are one way data flow")

More information about props:
https://v3.vuejs.org/guide/component-props.html#prop-types

Through the meta route, we can configure the title, icon, prompt and cache rule of a route tab.
https://bhuh12.github.io/vue-router-tab/api/#route-meta