this is an example given by the official of ele.me:
this.$alert("", "", {
     confirmButtonText: "",
          callback: action => {
            this.$message({
              type: "info",
              message: `action: ${ action }`
            });
          }
        });
      }there is too much code, so I want to package one myself:
import { Message } from "element-ui"
export function alertOK(msg,title){
    this.$alert(msg, title, {
        confirmButtonText: "",
        callback: action => {
            this.$message({
                type: "info"
            });
        }
    });
}
export default {alertOK}set to global, main.js:
import common from "@/common/global.js"
Vue.prototype.$common = commoncall Times error:
submit:function(){
    this.$common.alertOK("","");
}
  
 
