We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
How can I dynamically modify the content of a component
If I modify the value, I will prompt TS2540: Cannot assign to 'title' because it is a read-only property. What should I do?
The text was updated successfully, but these errors were encountered:
Sorry, something went wrong.
I think you should use like the follow code:
const notification = useNotification() const instance = notification.create({ title: "Wouldn't it be Nice", description: 'From the Beach Boys', content: `1234`, meta: '2019-5-27 15:11', avatar: () => h(NAvatar, { size: 'small', round: true, src: 'https://07akioni.oss-cn-beijing.aliyuncs.com/07akioni.jpeg' }), onAfterLeave: () => { message.success("Wouldn't it be Nice") } }) instance.title = 'xxxx'
If you want to use it outside setup, refer to https://www.naiveui.com/en-US/os-theme/components/message#Q-&-A.
NotificationReactive type will fix.
NotificationReactive
Talljack
Successfully merging a pull request may close this issue.
This function solves the problem (这个功能解决的问题)
How can I dynamically modify the content of a component
Expected API (期望的 API)
If I modify the value, I will prompt TS2540: Cannot assign to 'title' because it is a read-only property.
What should I do?
The text was updated successfully, but these errors were encountered: