繁体   English   中英

quasar notify - 如何更改关闭按钮的颜色?

[英]quasar notify - How to change close button color?

我可以更改文本颜色、按钮颜色、图标颜色、关闭按钮文本,但不能更改关闭按钮颜色。

在此处输入图像描述

我正在使用

return Notify.create({
  type: "positive",
  timeout: 0,
  html: true,
  message: "the message",
  closeBtn: true,
  textColor: "white",
});

如何更改“关闭”文本的颜色?

在撰写本文时,Notify 的 API 没有提供自定义closeBtn颜色的选项。 解决方法是创建一个动作并设置偏好颜色:

return Notify.create({
  type: "positive",
  timeout: 0,
  html: true,
  message: "the message",
  textColor: "white",
  actions: [
    { 
      label: 'Close', color: 'white', handler: () => undefined 
    }
  ]
});

暂无
暂无

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

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