song-ui-u
Version:
vue3 + js的PC前端组件库
17 lines (15 loc) • 366 B
JavaScript
const componentInstall = (com) => {
com.install = (app) => {
app.component(com.name, com);
};
return com;
};
const functionInstall = (fn, name) => {
fn.install = (app) => {
fn._context = app._context;
app.config.globalProperties[name] = fn;
};
return fn;
};
export { componentInstall, functionInstall };
//# sourceMappingURL=install.mjs.map