Iview dialog box this.$Modal.confirm () How to add class to it in, I can't add it with the className attribute

I want to add a style to this dialog box, but it does not affect the style of other dialog boxes. If you do not add class to let it be identified, other dialog box styles will change accordingly

May.28,2021

cannot be added, there is no this api. There is a clumsy way to add a style name to body, and the modal style is written under this style. Add it to body when it pops up and delete the class when class, closes

.

like this

body.strange-name {
    .modal {
        
    }
}

it's a strange way, but it works.

it is best not to use it, it is best to use the Modal component instead, and you are free to change the pop-up window.


glanced at iview's API,

clipboard.png

there is no config associated with class defined.

so there are probably two solutions.

one is not to use this.$Modal.confirm.. Implement a confirm-like modal component on the global APP that supports class.

the second is to directly use render, to render the content with class


you are not operating dom in the right way, vue is no longer the original dom, is your own virtual. When you see the official document render, you can render class

.
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-1bf8e83-32127.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-1bf8e83-32127.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?