I wrote a prompt pop-up box with an input box, but I want to encapsulate it as an attribute of Vue. What should I do?

my prompt box component is called dialog,. I want to encapsulate it as an attribute of
Vue. Write
this.$dialog ({.}) directly in the js logic to define the incoming value, and then you can call it. What to do, I have already written the component, and I don"t know how to make it into an attribute.

Apr.02,2021

is the plug-in
can refer to my previous question


function dialog(config) {
    // 
}
Vue.prototype.$dialog = dialog;

vue component is mounted to the global method can refer to

Menu