index.js 358 B

12345678910111213141516171819
  1. import util from './util';
  2. const utils = {
  3. install(Vue) {
  4. if (this.installed) {
  5. return;
  6. }
  7. this.installed = true;
  8. Object.defineProperties(Vue.prototype, {
  9. $utils: {
  10. get: () => {
  11. return util
  12. }
  13. }
  14. })
  15. }
  16. }
  17. export default utils