praella-agency / polaris-vue

Polaris Vue by HulkApps is a component library for Vue.js based on Shopify Polaris style guide.
https://polaris-vue.hulkapps.com
MIT License
37 stars 10 forks source link

Component PLink -> [Vue warn]: Invalid prop: type check failed for prop "to". Expected String, got Object #59

Closed PrintNow closed 3 years ago

PrintNow commented 3 years ago

Use the following wording Vue.js to report warnings!

Login.vue:

<PLink :to="{name: 'user_login'}">Return to log in</PLink>

router/index.js:

// ....

export const routes = [
  {
    path: '/login',
    name: 'user_login',
    component: () => import(`/src/views/User/Login`),
  }
]

// ....

The actual use of the passed Object parameter is valid, and you can jump to the path /login. Why restrict the use of the Object type?


My English is not good, the description may be inaccurate, please forgive me 😊

saurabh-sali-hulkapps commented 3 years ago

@PrintNow

Thank you for pointing out the issue here. We've resolved this issue, it will be released with our next release. It may take us a day or two to release the next version, meanwhile, you can pass the path like :to="/login".

Thank you.

PrintNow commented 3 years ago

@saurabh-sali-hulkapps

Thank you, looking forward to the next version