want to turn a previously made component into a plug-in, encapsulate it with the following code:
import Mylib from "./mylib"
const lib = {
install (Vue, o) {
var ele = ".elClassName"
if (ele) {
const Mylib = Vue.extend(Mylib)
const pluginName = new Mylib({propsData: {
a: o.a,
b: o.b
}})
setTimeout(() => {
libName.$mount(ele)
}, 0)
}
}
}
if (typeof window !== "undefined" && window.Vue) {
window.Vue.use(pluginName)
}
where window.Vue.use (pluginName) must not work, how can I write the parameters an and b here?