The problem of MessageBox in elementUI

messageBox global function in elementui is defined in vue

//
export  let messageBox = (vm) => {
    const h = vm.$createElement;
    vm.$msgbox(
        {
        title: " ",
        message: h("p", null, [
            h("span", {"class": "queMark"}, "?"),
            h("p", {"class": "text1"}, ""),
            h("p", {"class": "text2"}, "")
        ]),
        confirmButtonText: "",
        beforeClose: (action, instance, done) => {
            if (action === "confirm") {
                
                done();
            } else {
            
                done();
            }

        }
    });
};

call

in the component
//
            handleDelete: function () {
                let flag = messageBox(this);
                console.log(flag)
            },

but how can you get the value that you click to confirm or cancel? The output is always undefined;, not even with return, ask for expert advice


 if (action === 'confirm') {
                console.log(action)
                done();
            } else {

/ / console: click OK and then 'confirm'

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