index.js 317 B

123456789101112131415
  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. }