# easy-cooperation
**Repository Path**: bibinocode/easy-cooperation
## Basic Information
- **Project Name**: easy-cooperation
- **Description**: 创意团队协作和管理项目的Web应用
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-03-12
- **Last Updated**: 2025-03-13
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# Easy Operation - 易合作(企业级协同管理系统)
## 协同开发说明
1. 项目推荐使用 pnpm 进行依赖管理,node 版本推荐 >= 20.0.0
2. 创建分支:基于 develop 创建日常开发分支,分支命名规则:feature/xxx;
3. 提交代码:
1. 提交代码前,请确保执行 `npm run lint` 进行eslint 校验,并确保代码无语法错误(**目前没添加 git husky 校验,请确保先校验后提交哈**);
2. 提交代码时,请遵循提交规范,使用 feat、fix、docs、style 等标识,提交时请使用中文描述;
3. 提交代码后,可创建分支合并请求,并等待合并请求通过;
4. 开发规范:
1. 主题切换说明:
1. 请确保正确使用颜色变量,确保亮暗主题切换正常,详细说明请查阅:[theme](./src/style/theme/light.ts);
2. 由于 AntDesignVue 在页面上没有使用 var ,而是 cssInJS ,因此,可能直接在页面上无法获取变量值,请通过具体的颜色值,查阅到对应的变量,或者取相近的颜色值,进行替换;
3. 请遵照[theme](./src/style/theme/light.ts)内的注释说明,规范使用。
4. 顶部 Header 有快捷切换亮暗主题按钮,可用于调试。
2. I18n 国际化说明:
1. 请根据页面醒目标题、主要提示文字、关键内容文本等处,添加对应的 i18n 配置,并使用 `locale` 进行相应的国际化配置;
2. 接口请求等无法实现的,可不做要求。
5. theme、i18n 使用教程:
```ts
// 1. 内置的 AntDesignVue 的国际化、主题切换通过 config-provider 进行配置;
// 相关 theme i18n 均已抽象成 hook ,可查阅相关文件。
// 2. Theme
// 设置主题
import { setTheme } from './utils/theme';
// 从 localForage 中获取主题颜色并设置
setTheme(localForage.getItem('theme') || 'light');
// hook
import { useTheme } from './hooks/theme';
const { theme,themeMode,themeChange }=useTheme()
/**
* theme hook 中导出的 theme 、 themeMode 、themeChange
* theme 标识当前主题是 light 还是 dark
* themeMode 标识当前主题的模式 light dark system
* themeChange 是监听主题切换的回调
*/
// 3. i18n
// 实现语言切换 - hooks
import { useLocale } from './hooks/locale';
const { locale }= useLocale(); // locale 是当前语言包的配置对象
// 对应的是 src/i18n/ en-us | zh-cn | zh-tw /index.ts
en-us/index.ts:
export default { fullScreen: 'Full Screen' }
zh-cn/index.ts:
export default { fullScreen: '全屏' }
zh-tw/index.ts:
export default { fullScreen: '全屏' }
```