ssts-hospital-web-master项目实战记录四十五:项目迁移-业务模块实现(useBusiness文件结构)
记录时间:2024-03-19
文件结构
business/index.ts
// 基础部分
import * as BizBase from './biz-base'
// 自定义部分
import * as BizCustom from './biz-custom'
// 项目部分
import * as BizProj from './biz-proj'
// 导出业务服务
export const useBusiness = () => {
return { ...BizBase, ...BizCustom, ...BizProj }
}
business/biz-base/index.ts
// 基础配置
export * from './base-config'
// 基础数据
export * from './base-data'
// 基础处理器
export * from './base-handler'
business/biz-custom/index.ts
// 页面操作类
export * from './page-handler'
// 按钮操作类
export * from './button-handler'
// 文本框操作类
export * from './text-handler'
business/biz-proj/index.ts
// 签到操作类
export * from './sign-in-handler'
// 菜单操作类
export * from './menu-handler'
// 页面操作类
export * from './page-handler'
// 数据操作类
export * from './data-handler'