Skip to content

Can't use router or vm parameter in notification #2221

@mathieutu

Description

@mathieutu
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.5.5

Environment

any

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Add a router-link or anything that need access to the vue-app in description or message.

notification.error({
  message: 'Problem',
  description: h => h('router-link', { props: { to: '/foo' } }, 'Go to /foo')
})

What is expected?

The component should render and behave properly.

What is actually happening?

[Vue warn]: Error in render: "TypeError: router is undefined

found in

---> <RouterLink>
<Anonymous>
<TransitionGroup>
<Anonymous>
<Root>

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions