The alert component of antd cannot customize styles.

  1. my project development environment is antd + dva + umi. When using antd, it is convenient to customize the style by overriding the less variable in the custom theme. But today I found that the Alert component can"t easily customize the style (foreground color, background color).
  2. theme.js related code is as follows
{
    "@primary-color": "-sharp3a377d",
    "@link-color": "-sharp3a377d",
    "@popover-bg": "-sharp37777d",
    "@border-radius-base": "0px",
    "@popover-color": "-sharpfff",
    "@info-color": "-sharp393a7a",
    "@alert-message-color": "-sharpfff",
    "@alert-text-color": "-sharpfff",
}

3. The actual effect is shown in the figure. The background color is not the color I specified, but a variation generated by antd calling a colorPalette function, and the foreground color has no effect at all.

would you like to ask if you have a good way to customize the alert style? Thank you!

Apr.01,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3bbcb-2c2cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3bbcb-2c2cf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?