简体   繁体   English

Nuxtjs/Toast 和自定义图标

[英]Nuxtjs/Toast and custom icons

Is it possible to add an icon into the message of a toast error or do I need to install a different/another module?是否可以在 Toast 错误消息中添加一个图标,或者我是否需要安装不同的/另一个模块? I'm using vue and trying to add a component as an icon at the moment but not having any luck.我正在使用 vue 并尝试将组件添加为图标,但没有任何运气。

this.$toast.error('<icon-paperclip />')

Thanks!谢谢!

Here it's written that you can pass either String or HTML .这里写到您可以传递StringHTML

Since a Vue component is a bit more than that, you will probably not be able to pass it directly.由于 Vue 组件远不止于此,您可能无法直接传递它。

Meanwhile, you could probably look for some HTML icon and inline it here.同时,您可能会在此处查找一些 HTML 图标并将其内联。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM