song-ui-u
Version:
vue3 + js的PC前端组件库
20 lines (17 loc) • 423 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;
};
exports.componentInstall = componentInstall;
exports.functionInstall = functionInstall;
//# sourceMappingURL=install.cjs.map