index.js 319 B

1234567891011121314
  1. export function withInstall(component) {
  2. component.install = function (app) {
  3. app.component(component.name, component);
  4. };
  5. return component;
  6. }
  7. export function WithInstallOfGlobalMethod(globalName, method) {
  8. method.install = function (app) {
  9. app.prototype[globalName] = method;
  10. };
  11. return method;
  12. }