index.js 611 B

123456789101112131415161718192021222324252627
  1. import MyCommon from '../../lib/utils/index'
  2. import MyRouter from './router/index'
  3. import MyPrompt from './prompt/index'
  4. import MyError from './error/index'
  5. import MyVerification from './verification/index'
  6. export class MyHelp {
  7. constructor() {
  8. this.$common = MyCommon
  9. this.$router = MyRouter
  10. this.$prompt = MyPrompt
  11. this.$error = MyError
  12. this.$verification = MyVerification
  13. this.instance = null
  14. }
  15. static getInstance() {
  16. if (!this.instance) {
  17. this.instance = new MyHelp()
  18. }
  19. return this.instance
  20. }
  21. }
  22. let _myHelp = MyHelp.getInstance()
  23. export default _myHelp