Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

message content vnode is empty #554

Closed
1 task
maxiloEmmmm opened this issue Mar 5, 2019 · 6 comments
Closed
1 task

message content vnode is empty #554

maxiloEmmmm opened this issue Mar 5, 2019 · 6 comments
Labels

Comments

@maxiloEmmmm
Copy link

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

Version

1.3.5

Environment

ant-design-vue@1.3.5 vue@2.6.7 chrome@69.0.3497.106

Reproduction link

Edit on CodeSandbox

Steps to reproduce

ant-design-vue@1.3.5
vue@2.6.7
chrome@69.0.3497.106

this.$utils.msg.info(h=>{
return (<div>1</div>)
}, 5)

image

this.$utils.notification.info({
description: h=>{
return (<div>1</div>)
},
message: 'x',
duration: 5
})

image

What is expected?

vnode display in message component

What is actually happening?

vnode no display in message component

@sendya
Copy link
Member

sendya commented Mar 6, 2019

Hi, dear:

Please refer to

@tangjinzhou
Copy link
Member

@sendya we should support VNode and (h)=>VNode .

@maxiloEmmmm You can use vnode directly like @sendya .
we will fix it in next version.

@maxiloEmmmm
Copy link
Author

@sendya
@tangjinzhou
thx.

@yurizhang
Copy link

這個在
this.$confirm({
title: 'Confirm',
content: content}) 好像也不行

@xhubert
Copy link

xhubert commented Jul 11, 2019

这样处理,亲测可行:

...
          <a-button
            @click="confirm"
          >
            Confirm
          </a-button>
···
confirm() {
      const confirmOptions = {
        title: 'Confirm',
        content: (
          <div>
            <p>some messages...some messages...</p>
            <p>some messages...some messages...</p>
          </div>
        ),
        okText: 'OK',
        cancelText: 'Cancel',
        autoFocusButton: 'cancel',
        onOk: () => {
          return new Promise((resolve, reject) => {
            setTimeout(Math.random() > 0.5 ? resolve : reject, 1000)
          }).catch(() => console.log('Oops errors!'))
        }
      }
      this.$confirm(confirmOptions)
}

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 11, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

5 participants