ITUIServer.ts 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. import { TUICoreParams, TUICoreLoginParams } from '../type';
  2. export default class ITUIServer {
  3. /**
  4. * 初始化TUICore
  5. *
  6. * @param {TUICoreParams} options 初始化参数
  7. */
  8. static init(options:TUICoreParams) {}
  9. /**
  10. * TUICore 挂载vue方法
  11. *
  12. * @param {Vue} app vue createApp实例
  13. */
  14. public install(app:any) {}
  15. /**
  16. * 获取TUICore实例
  17. *
  18. */
  19. public getInstance() {}
  20. /**
  21. * TUICore 登录
  22. *
  23. * @param {TUICoreLoginParams} options 登录参数
  24. * @param {string} options.userID 当前用户名
  25. * @param {string} options.userSig 当前用户名签名
  26. * @returns {Promise}
  27. */
  28. public login(options:TUICoreLoginParams): Promise<any> {
  29. return new Promise<void>((resolve, reject) => {
  30. });
  31. }
  32. /**
  33. * TUICore 销毁
  34. */
  35. public destroyed() {}
  36. /**
  37. * 组件挂载
  38. *
  39. * @param {string} TUIName 挂载的组件名
  40. * @param {any} TUIComponent 挂载的组件
  41. */
  42. public component(TUIName: string, TUIComponent:any) {}
  43. /**
  44. * 插件注入
  45. *
  46. * @param {any} TUIPlugin 需要挂载模块的服务
  47. * @param {any} options 需要挂载模块的服务
  48. */
  49. public use(TUIPlugin:any, options?: any) { }
  50. /**
  51. * 方法调用
  52. *
  53. * @param {string} TUIName 组件名
  54. * @param {callback} callback 调用的方法
  55. */
  56. public setAwaitFunc(TUIName: string, callback: any) {}
  57. /**
  58. * 设置公共数据
  59. *
  60. * @param {object} store 设置全局的数据
  61. */
  62. public setCommonStore(store: object) {}
  63. /**
  64. * 挂载组件数据
  65. *
  66. * @param {string} TUIName 模块名
  67. * @param {any} store 挂载的数据
  68. * @param {callback} updateCallback 更新数据 callback
  69. */
  70. public setComponentStore(TUIName:string, store: any, updateCallback?:any) {}
  71. /**
  72. * 获取 store 数据库
  73. *
  74. */
  75. public getStore() {}
  76. /**
  77. * 监听全局数据
  78. *
  79. * @param {Array} keys 需要监听的数据key
  80. * @param {callback} callback 数据变化回调
  81. */
  82. public storeCommonListener(keys:Array<string>, callback: any) {}
  83. }