UNPKG

@wfrog/vc

Version:

vue3 组件库 vc

36 lines (32 loc) 859 B
import { N as NOOP } from './E_WRn0OP.mjs'; var _export_sfc = (sfc, props) => { const target = sfc.__vccOpts || sfc; for (const [key, val] of props) { target[key] = val; } return target; }; const withInstall = (main, extra) => { main.install = (app) => { for (const comp of [main, ...Object.values(extra != null ? extra : {})]) { app.component(comp.name, comp); } }; if (extra) { for (const [key, comp] of Object.entries(extra)) { main[key] = comp; } } return main; }; const withInstallDirective = (directive, name) => { directive.install = (app) => { app.directive(name, directive); }; return directive; }; const withNoopInstall = (component) => { component.install = NOOP; return component; }; export { _export_sfc as _, withNoopInstall as a, withInstallDirective as b, withInstall as w };