Business scenario: Using the EL-Dialog of Vue + Element UI, after clicking the popup window, the first button is loaded by default for initialization.

 div

Instructions:

 // Automatically triggers the click event
  directives: {trigger: {inserted(el,binging){
            // console.log(" automatic trigger event ")
            el.click()
          }
        }
  },
Copy the code