v1.0.2 - README updates
This commit is contained in:
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [1.0.2] - 2025-07-01
|
||||||
|
|
||||||
|
### Changed / Added
|
||||||
|
- 更新README文档
|
||||||
|
- 增加贡献说明
|
||||||
|
- 增加贡献者列表
|
||||||
|
|
||||||
## [1.0.1] - 2025-07-01
|
## [1.0.1] - 2025-07-01
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|||||||
480
CONTRIBUTING-EN.md
Normal file
480
CONTRIBUTING-EN.md
Normal file
@@ -0,0 +1,480 @@
|
|||||||
|
# Contributing to jordium-gantt-vue3
|
||||||
|
|
||||||
|
Thank you for your interest in contributing to jordium-gantt-vue3! We welcome contributions from the community and are pleased to have you join us.
|
||||||
|
|
||||||
|
## 🌍 Languages
|
||||||
|
|
||||||
|
This document is available in multiple languages:
|
||||||
|
- [中文版](./CONTRIBUTING.md)
|
||||||
|
- [English](./CONTRIBUTING-EN.md)
|
||||||
|
|
||||||
|
## 📋 Table of Contents
|
||||||
|
|
||||||
|
- [Code of Conduct](#code-of-conduct)
|
||||||
|
- [How to Contribute](#how-to-contribute)
|
||||||
|
- [Development Setup](#development-setup)
|
||||||
|
- [Project Structure](#project-structure)
|
||||||
|
- [Coding Standards](#coding-standards)
|
||||||
|
- [Commit Guidelines](#commit-guidelines)
|
||||||
|
- [Pull Request Process](#pull-request-process)
|
||||||
|
- [Issue Guidelines](#issue-guidelines)
|
||||||
|
- [Testing](#testing)
|
||||||
|
- [Documentation](#documentation)
|
||||||
|
|
||||||
|
## 📜 Code of Conduct
|
||||||
|
|
||||||
|
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to [ning.li@jordium.com](mailto:ning.li@jordium.com) / [nelson820125@gmail.com](mailto:nelson820125@gmail.com).
|
||||||
|
|
||||||
|
### Our Standards
|
||||||
|
|
||||||
|
- **Be respectful** and inclusive
|
||||||
|
- **Be collaborative** and constructive
|
||||||
|
- **Be patient** with newcomers
|
||||||
|
- **Be considerate** of different perspectives
|
||||||
|
- **Focus on what's best** for the community
|
||||||
|
|
||||||
|
## 🤝 How to Contribute
|
||||||
|
|
||||||
|
There are many ways to contribute to jordium-gantt-vue3:
|
||||||
|
|
||||||
|
### 🐛 Bug Reports
|
||||||
|
- Search existing issues first
|
||||||
|
- Use our bug report template
|
||||||
|
- Provide clear reproduction steps
|
||||||
|
- Include environment details
|
||||||
|
|
||||||
|
### 💡 Feature Requests
|
||||||
|
- Check if the feature already exists
|
||||||
|
- Explain the use case and benefits
|
||||||
|
- Provide mockups or examples if possible
|
||||||
|
|
||||||
|
### 🔧 Code Contributions
|
||||||
|
- Bug fixes
|
||||||
|
- New features
|
||||||
|
- Performance improvements
|
||||||
|
- Documentation updates
|
||||||
|
|
||||||
|
### 📚 Documentation
|
||||||
|
- Fix typos or unclear content
|
||||||
|
- Add examples and tutorials
|
||||||
|
- Translate documentation
|
||||||
|
- Improve API documentation
|
||||||
|
|
||||||
|
## 🛠️ Development Setup
|
||||||
|
|
||||||
|
### Prerequisites
|
||||||
|
|
||||||
|
- **Node.js**: >= 16.0.0
|
||||||
|
- **npm**: >= 8.0.0 (or yarn >= 1.22.0)
|
||||||
|
- **Git**: Latest version
|
||||||
|
|
||||||
|
### Clone and Setup
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Clone the repository
|
||||||
|
git clone https://github.com/nelson820125/jordium-gantt-vue3.git
|
||||||
|
cd jordium-gantt-vue3
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# Start development server
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# Open another terminal for the demo
|
||||||
|
cd demo
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### Available Scripts
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Development
|
||||||
|
npm run dev # Start development server
|
||||||
|
npm run dev:demo # Start demo development server
|
||||||
|
|
||||||
|
# Building
|
||||||
|
npm run build # Build for production
|
||||||
|
npm run build:lib # Build library for npm
|
||||||
|
|
||||||
|
# Quality Assurance
|
||||||
|
npm run lint # Run ESLint
|
||||||
|
npm run lint:fix # Fix ESLint issues
|
||||||
|
npm run type-check # TypeScript type checking
|
||||||
|
npm run format # Format code with Prettier
|
||||||
|
npm run format:check # Check code formatting
|
||||||
|
|
||||||
|
# Testing
|
||||||
|
npm run test # Run unit tests
|
||||||
|
npm run test:watch # Run tests in watch mode
|
||||||
|
npm run test:coverage # Run tests with coverage
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📁 Project Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
jordium-gantt-vue3/
|
||||||
|
├── src/ # Main source code
|
||||||
|
│ ├── components/ # Vue components
|
||||||
|
│ │ ├── GanttChart.vue # Main Gantt chart component
|
||||||
|
│ │ ├── Timeline.vue # Timeline component
|
||||||
|
│ │ ├── TaskList.vue # Task list component
|
||||||
|
│ │ └── ...
|
||||||
|
│ ├── composables/ # Vue composables
|
||||||
|
│ │ ├── useI18n.ts # Internationalization
|
||||||
|
│ │ └── useMessage.ts # Message system
|
||||||
|
│ ├── models/ # TypeScript models
|
||||||
|
│ │ ├── classes/ # Data classes
|
||||||
|
│ │ └── configs/ # Configuration types
|
||||||
|
│ └── styles/ # Global styles
|
||||||
|
├── demo/ # Demo application
|
||||||
|
├── packageDemo/ # Package demo for testing
|
||||||
|
├── docs/ # Documentation
|
||||||
|
├── tests/ # Test files
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎨 Coding Standards
|
||||||
|
|
||||||
|
### Code Style
|
||||||
|
|
||||||
|
We use ESLint and Prettier to maintain consistent code style:
|
||||||
|
|
||||||
|
- **Indentation**: 2 spaces
|
||||||
|
- **Quotes**: Single quotes for strings
|
||||||
|
- **Semicolons**: Not required
|
||||||
|
- **Line length**: 100 characters max
|
||||||
|
- **Trailing commas**: ES5 style
|
||||||
|
|
||||||
|
### Vue.js Guidelines
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup lang="ts">
|
||||||
|
// 1. Imports first
|
||||||
|
import { ref, computed, onMounted } from 'vue'
|
||||||
|
import type { Task } from '../models/classes/Task'
|
||||||
|
|
||||||
|
// 2. Props definition
|
||||||
|
interface Props {
|
||||||
|
tasks: Task[]
|
||||||
|
showToolbar?: boolean
|
||||||
|
}
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
showToolbar: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 3. Emits definition
|
||||||
|
const emit = defineEmits<{
|
||||||
|
taskUpdated: [task: Task]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
// 4. Reactive data
|
||||||
|
const isLoading = ref(false)
|
||||||
|
|
||||||
|
// 5. Computed properties
|
||||||
|
const taskCount = computed(() => props.tasks.length)
|
||||||
|
|
||||||
|
// 6. Methods
|
||||||
|
const handleTaskUpdate = (task: Task) => {
|
||||||
|
emit('taskUpdated', task)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 7. Lifecycle hooks
|
||||||
|
onMounted(() => {
|
||||||
|
// Initialize component
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<!-- Use semantic HTML and accessible attributes -->
|
||||||
|
<div class="gantt-container" role="application" aria-label="Gantt Chart">
|
||||||
|
<!-- Component content -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* Use CSS custom properties for theming */
|
||||||
|
.gantt-container {
|
||||||
|
background: var(--gantt-bg-primary, #ffffff);
|
||||||
|
color: var(--gantt-text-primary, #303133);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
```
|
||||||
|
|
||||||
|
### TypeScript Guidelines
|
||||||
|
|
||||||
|
- **Strict mode**: Enable strict TypeScript checking
|
||||||
|
- **Explicit types**: Prefer explicit type annotations for public APIs
|
||||||
|
- **Interfaces**: Use interfaces for object shapes
|
||||||
|
- **Enums**: Use const assertions or union types instead of enums
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Good
|
||||||
|
interface TaskOptions {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
assignee?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Better for simple cases
|
||||||
|
type TaskStatus = 'pending' | 'in-progress' | 'completed'
|
||||||
|
|
||||||
|
// Use generic constraints
|
||||||
|
function updateTask<T extends Task>(task: T): T {
|
||||||
|
return { ...task, updatedAt: new Date() }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 Commit Guidelines
|
||||||
|
|
||||||
|
We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification:
|
||||||
|
|
||||||
|
### Commit Message Format
|
||||||
|
|
||||||
|
```
|
||||||
|
<type>[optional scope]: <description>
|
||||||
|
|
||||||
|
[optional body]
|
||||||
|
|
||||||
|
[optional footer]
|
||||||
|
```
|
||||||
|
|
||||||
|
### Types
|
||||||
|
|
||||||
|
- **feat**: New feature
|
||||||
|
- **fix**: Bug fix
|
||||||
|
- **docs**: Documentation changes
|
||||||
|
- **style**: Code style changes (formatting, etc.)
|
||||||
|
- **refactor**: Code refactoring
|
||||||
|
- **perf**: Performance improvements
|
||||||
|
- **test**: Add or update tests
|
||||||
|
- **chore**: Maintenance tasks
|
||||||
|
|
||||||
|
### Examples
|
||||||
|
|
||||||
|
```bash
|
||||||
|
feat(timeline): add zoom feature
|
||||||
|
fix(taskbar): fix drag position calculation issue
|
||||||
|
docs(api): update GanttChart props documentation
|
||||||
|
style(components): format code with prettier
|
||||||
|
refactor(composables): extract common logic to useGantt
|
||||||
|
perf(timeline): optimize virtual scrolling
|
||||||
|
test(timeline): add unit tests for zoom feature
|
||||||
|
chore(deps): update vue to 3.4.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### Scope Guidelines
|
||||||
|
|
||||||
|
- **components**: Vue components
|
||||||
|
- **composables**: Vue composables
|
||||||
|
- **models**: TypeScript models
|
||||||
|
- **styles**: CSS/styling changes
|
||||||
|
- **timeline**: Timeline-related changes
|
||||||
|
- **taskbar**: Taskbar-related changes
|
||||||
|
- **i18n**: Internationalization
|
||||||
|
- **demo**: Demo application
|
||||||
|
- **build**: Build system
|
||||||
|
- **ci**: CI/CD changes
|
||||||
|
|
||||||
|
## 🔄 Pull Request Process
|
||||||
|
|
||||||
|
### Before Submitting
|
||||||
|
|
||||||
|
1. **Fork** the repository
|
||||||
|
2. **Create** a feature branch from `main`
|
||||||
|
3. **Make** your changes
|
||||||
|
4. **Add** tests for new functionality
|
||||||
|
5. **Update** documentation
|
||||||
|
6. **Run** linting and tests
|
||||||
|
7. **Commit** using conventional commit format
|
||||||
|
|
||||||
|
### PR Checklist
|
||||||
|
|
||||||
|
- [ ] Code follows the style guidelines
|
||||||
|
- [ ] Self-review of code completed
|
||||||
|
- [ ] Tests added for new functionality
|
||||||
|
- [ ] All tests pass
|
||||||
|
- [ ] Documentation updated
|
||||||
|
- [ ] No merge conflicts
|
||||||
|
- [ ] Conventional commit format used
|
||||||
|
|
||||||
|
### PR Template
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## Description
|
||||||
|
Brief description of changes
|
||||||
|
|
||||||
|
## Type of Change
|
||||||
|
- [ ] Bug fix
|
||||||
|
- [ ] New feature
|
||||||
|
- [ ] Breaking change
|
||||||
|
- [ ] Documentation update
|
||||||
|
|
||||||
|
## Testing
|
||||||
|
- [ ] Unit tests pass
|
||||||
|
- [ ] Manual testing completed
|
||||||
|
- [ ] Demo application works
|
||||||
|
|
||||||
|
## Screenshots (if applicable)
|
||||||
|
Add screenshots here
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
- [ ] Code follows style guidelines
|
||||||
|
- [ ] Self-review completed
|
||||||
|
- [ ] Tests added/updated
|
||||||
|
- [ ] Documentation updated
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🐛 Issue Guidelines
|
||||||
|
|
||||||
|
### Bug Reports
|
||||||
|
|
||||||
|
Use the bug report template and include:
|
||||||
|
|
||||||
|
1. **Environment**: OS, browser, Node.js version
|
||||||
|
2. **Steps to reproduce**: Clear, numbered steps
|
||||||
|
3. **Expected behavior**: What should happen
|
||||||
|
4. **Actual behavior**: What actually happens
|
||||||
|
5. **Screenshots**: If applicable
|
||||||
|
6. **Additional context**: Any other relevant information
|
||||||
|
|
||||||
|
### Feature Requests
|
||||||
|
|
||||||
|
Use the feature request template and include:
|
||||||
|
|
||||||
|
1. **Problem description**: What problem does this solve?
|
||||||
|
2. **Proposed solution**: How should it work?
|
||||||
|
3. **Alternatives considered**: Other approaches considered
|
||||||
|
4. **Additional context**: Mockups, examples, etc.
|
||||||
|
|
||||||
|
## 🧪 Testing
|
||||||
|
|
||||||
|
### Writing Tests
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Example unit test
|
||||||
|
import { describe, it, expect } from 'vitest'
|
||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import GanttChart from '../src/components/GanttChart.vue'
|
||||||
|
|
||||||
|
describe('GanttChart', () => {
|
||||||
|
it('renders tasks correctly', () => {
|
||||||
|
const tasks = [
|
||||||
|
{ id: 1, name: 'Task 1', startDate: '2025-01-01', endDate: '2025-01-05' }
|
||||||
|
]
|
||||||
|
|
||||||
|
const wrapper = mount(GanttChart, {
|
||||||
|
props: { tasks }
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(wrapper.text()).toContain('Task 1')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
### Test Coverage
|
||||||
|
|
||||||
|
- Aim for **80%+ code coverage**
|
||||||
|
- Test **critical functionality** thoroughly
|
||||||
|
- Include **edge cases** and **error scenarios**
|
||||||
|
- Test **accessibility** features
|
||||||
|
|
||||||
|
## 📚 Documentation
|
||||||
|
|
||||||
|
### Code Documentation
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
/**
|
||||||
|
* Calculates the position of a task on the timeline
|
||||||
|
* @param task - The task object containing date information
|
||||||
|
* @param startDate - The timeline start date
|
||||||
|
* @param dayWidth - Width of one day in pixels
|
||||||
|
* @returns Object containing left position and width
|
||||||
|
*/
|
||||||
|
function calculateTaskPosition(
|
||||||
|
task: Task,
|
||||||
|
startDate: Date,
|
||||||
|
dayWidth: number
|
||||||
|
): { left: number; width: number } {
|
||||||
|
// Implementation
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### README Updates
|
||||||
|
|
||||||
|
When adding new features:
|
||||||
|
|
||||||
|
1. Update the feature list
|
||||||
|
2. Add usage examples
|
||||||
|
3. Update API documentation
|
||||||
|
4. Include screenshots if UI changes
|
||||||
|
|
||||||
|
## 🌍 Internationalization
|
||||||
|
|
||||||
|
### Adding New Languages
|
||||||
|
|
||||||
|
1. Create language file in `src/composables/useI18n.ts`
|
||||||
|
2. Add translations for all keys
|
||||||
|
3. Test with the new language
|
||||||
|
4. Update documentation
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// Example language addition
|
||||||
|
const messages = {
|
||||||
|
'zh-CN': { /* Chinese translations */ },
|
||||||
|
'en-US': { /* English translations */ },
|
||||||
|
'fr-FR': { /* French translations */ }, // New language
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🏷️ Release Process
|
||||||
|
|
||||||
|
### Version Bumping
|
||||||
|
|
||||||
|
We use [Semantic Versioning](https://semver.org/):
|
||||||
|
|
||||||
|
- **MAJOR**: Breaking changes
|
||||||
|
- **MINOR**: New features (backward compatible)
|
||||||
|
- **PATCH**: Bug fixes (backward compatible)
|
||||||
|
|
||||||
|
### Release Checklist
|
||||||
|
|
||||||
|
- [ ] All tests pass
|
||||||
|
- [ ] Documentation updated
|
||||||
|
- [ ] CHANGELOG.md updated
|
||||||
|
- [ ] Version bumped in package.json
|
||||||
|
- [ ] Git tag created
|
||||||
|
- [ ] NPM package published
|
||||||
|
- [ ] GitHub release created
|
||||||
|
|
||||||
|
## 📞 Getting Help
|
||||||
|
|
||||||
|
### Community Support
|
||||||
|
|
||||||
|
- **GitHub Discussions**: General questions and ideas
|
||||||
|
- **GitHub Issues**: Bug reports and feature requests
|
||||||
|
- **Email**: [ning.li@jordium.com](mailto:ning.li@jordium.com) / [nelson820125@gmail.com](mailto:nelson820125@gmail.com)
|
||||||
|
|
||||||
|
### Maintainer Response Times
|
||||||
|
|
||||||
|
- **Critical bugs**: Within 24 hours
|
||||||
|
- **Regular issues**: Within 7 days
|
||||||
|
- **Feature requests**: Within 14 days
|
||||||
|
- **Pull requests**: Within 7 days
|
||||||
|
|
||||||
|
## 🙏 Recognition
|
||||||
|
|
||||||
|
Contributors will be:
|
||||||
|
- Added to the [Contributors](./CONTRIBUTORS.md) list
|
||||||
|
- Mentioned in release notes
|
||||||
|
- Given credit in documentation
|
||||||
|
|
||||||
|
## 📄 License
|
||||||
|
|
||||||
|
By contributing to jordium-gantt-vue3, you agree that your contributions will be licensed under the MIT License.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**Thank you for contributing to jordium-gantt-vue3! 🎉**
|
||||||
|
|
||||||
|
Your contributions help make this project better for everyone.
|
||||||
480
CONTRIBUTING.md
Normal file
480
CONTRIBUTING.md
Normal file
@@ -0,0 +1,480 @@
|
|||||||
|
# 贡献指南 - jordium-gantt-vue3
|
||||||
|
|
||||||
|
感谢您对 jordium-gantt-vue3 项目的关注!我们欢迎社区的贡献,很高兴您能加入我们。
|
||||||
|
|
||||||
|
## 🌍 多语言版本
|
||||||
|
|
||||||
|
本文档提供多种语言版本:
|
||||||
|
- [中文版](./CONTRIBUTING.md)
|
||||||
|
- [English](./CONTRIBUTING-EN.md)
|
||||||
|
|
||||||
|
## 📋 目录
|
||||||
|
|
||||||
|
- [行为准则](#行为准则)
|
||||||
|
- [如何贡献](#如何贡献)
|
||||||
|
- [开发环境搭建](#开发环境搭建)
|
||||||
|
- [项目结构](#项目结构)
|
||||||
|
- [编码规范](#编码规范)
|
||||||
|
- [提交规范](#提交规范)
|
||||||
|
- [Pull Request 流程](#pull-request-流程)
|
||||||
|
- [Issue 指南](#issue-指南)
|
||||||
|
- [测试](#测试)
|
||||||
|
- [文档](#文档)
|
||||||
|
|
||||||
|
## 📜 行为准则
|
||||||
|
|
||||||
|
本项目及其参与者均受我们的行为准则约束。通过参与,您需要遵守此准则。如发现不当行为,请报告至 [ning.li@jordium.com](mailto:ning.li@jordium.com) / [nelson820125@gmail.com](mailto:nelson820125@gmail.com)。
|
||||||
|
|
||||||
|
### 我们的标准
|
||||||
|
|
||||||
|
- **相互尊重**,包容多元化
|
||||||
|
- **协作建设**,提供建设性意见
|
||||||
|
- **耐心待人**,特别是对新手
|
||||||
|
- **考虑周全**,理解不同观点
|
||||||
|
- **关注大局**,以社区利益为重
|
||||||
|
|
||||||
|
## 🤝 如何贡献
|
||||||
|
|
||||||
|
您可以通过多种方式为 jordium-gantt-vue3 做贡献:
|
||||||
|
|
||||||
|
### 🐛 错误报告
|
||||||
|
- 首先搜索已有问题
|
||||||
|
- 使用我们的错误报告模板
|
||||||
|
- 提供清晰的重现步骤
|
||||||
|
- 包含环境详细信息
|
||||||
|
|
||||||
|
### 💡 功能建议
|
||||||
|
- 检查功能是否已存在
|
||||||
|
- 说明使用场景和好处
|
||||||
|
- 如可能提供原型图或示例
|
||||||
|
|
||||||
|
### 🔧 代码贡献
|
||||||
|
- 错误修复
|
||||||
|
- 新功能开发
|
||||||
|
- 性能优化
|
||||||
|
- 文档更新
|
||||||
|
|
||||||
|
### 📚 文档贡献
|
||||||
|
- 修复错别字或不清楚的内容
|
||||||
|
- 添加示例和教程
|
||||||
|
- 翻译文档
|
||||||
|
- 改进 API 文档
|
||||||
|
|
||||||
|
## 🛠️ 开发环境搭建
|
||||||
|
|
||||||
|
### 前置要求
|
||||||
|
|
||||||
|
- **Node.js**: >= 16.0.0
|
||||||
|
- **npm**: >= 8.0.0(或 yarn >= 1.22.0)
|
||||||
|
- **Git**: 最新版本
|
||||||
|
|
||||||
|
### 克隆和设置
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 克隆仓库
|
||||||
|
git clone https://github.com/nelson820125/jordium-gantt-vue3.git
|
||||||
|
cd jordium-gantt-vue3
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
npm install
|
||||||
|
|
||||||
|
# 启动开发服务器
|
||||||
|
npm run dev
|
||||||
|
|
||||||
|
# 打开另一个终端运行演示
|
||||||
|
cd demo
|
||||||
|
npm run dev
|
||||||
|
```
|
||||||
|
|
||||||
|
### 可用脚本
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 开发
|
||||||
|
npm run dev # 启动开发服务器
|
||||||
|
npm run dev:demo # 启动演示开发服务器
|
||||||
|
|
||||||
|
# 构建
|
||||||
|
npm run build # 生产环境构建
|
||||||
|
npm run build:lib # 构建 npm 包
|
||||||
|
|
||||||
|
# 质量保证
|
||||||
|
npm run lint # 运行 ESLint
|
||||||
|
npm run lint:fix # 修复 ESLint 问题
|
||||||
|
npm run type-check # TypeScript 类型检查
|
||||||
|
npm run format # 使用 Prettier 格式化代码
|
||||||
|
npm run format:check # 检查代码格式
|
||||||
|
|
||||||
|
# 测试
|
||||||
|
npm run test # 运行单元测试
|
||||||
|
npm run test:watch # 监视模式运行测试
|
||||||
|
npm run test:coverage # 运行测试并生成覆盖率报告
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📁 项目结构
|
||||||
|
|
||||||
|
```
|
||||||
|
jordium-gantt-vue3/
|
||||||
|
├── src/ # 主要源代码
|
||||||
|
│ ├── components/ # Vue 组件
|
||||||
|
│ │ ├── GanttChart.vue # 主甘特图组件
|
||||||
|
│ │ ├── Timeline.vue # 时间轴组件
|
||||||
|
│ │ ├── TaskList.vue # 任务列表组件
|
||||||
|
│ │ └── ...
|
||||||
|
│ ├── composables/ # Vue 组合式函数
|
||||||
|
│ │ ├── useI18n.ts # 国际化
|
||||||
|
│ │ └── useMessage.ts # 消息系统
|
||||||
|
│ ├── models/ # TypeScript 模型
|
||||||
|
│ │ ├── classes/ # 数据类
|
||||||
|
│ │ └── configs/ # 配置类型
|
||||||
|
│ └── styles/ # 全局样式
|
||||||
|
├── demo/ # 演示应用
|
||||||
|
├── packageDemo/ # 包演示用于测试
|
||||||
|
├── docs/ # 文档
|
||||||
|
├── tests/ # 测试文件
|
||||||
|
└── ...
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🎨 编码规范
|
||||||
|
|
||||||
|
### 代码风格
|
||||||
|
|
||||||
|
我们使用 ESLint 和 Prettier 来保持一致的代码风格:
|
||||||
|
|
||||||
|
- **缩进**: 2 个空格
|
||||||
|
- **引号**: 字符串使用单引号
|
||||||
|
- **分号**: 不要求分号
|
||||||
|
- **行长度**: 最大 100 字符
|
||||||
|
- **尾随逗号**: ES5 风格
|
||||||
|
|
||||||
|
### Vue.js 指南
|
||||||
|
|
||||||
|
```vue
|
||||||
|
<script setup lang="ts">
|
||||||
|
// 1. 导入放在最前面
|
||||||
|
import { ref, computed, onMounted } from 'vue'
|
||||||
|
import type { Task } from '../models/classes/Task'
|
||||||
|
|
||||||
|
// 2. Props 定义
|
||||||
|
interface Props {
|
||||||
|
tasks: Task[]
|
||||||
|
showToolbar?: boolean
|
||||||
|
}
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
showToolbar: true
|
||||||
|
})
|
||||||
|
|
||||||
|
// 3. Emits 定义
|
||||||
|
const emit = defineEmits<{
|
||||||
|
taskUpdated: [task: Task]
|
||||||
|
}>()
|
||||||
|
|
||||||
|
// 4. 响应式数据
|
||||||
|
const isLoading = ref(false)
|
||||||
|
|
||||||
|
// 5. 计算属性
|
||||||
|
const taskCount = computed(() => props.tasks.length)
|
||||||
|
|
||||||
|
// 6. 方法
|
||||||
|
const handleTaskUpdate = (task: Task) => {
|
||||||
|
emit('taskUpdated', task)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 7. 生命周期钩子
|
||||||
|
onMounted(() => {
|
||||||
|
// 初始化组件
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<!-- 使用语义化 HTML 和可访问性属性 -->
|
||||||
|
<div class="gantt-container" role="application" aria-label="甘特图">
|
||||||
|
<!-- 组件内容 -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
/* 使用 CSS 自定义属性进行主题化 */
|
||||||
|
.gantt-container {
|
||||||
|
background: var(--gantt-bg-primary, #ffffff);
|
||||||
|
color: var(--gantt-text-primary, #303133);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
```
|
||||||
|
|
||||||
|
### TypeScript 指南
|
||||||
|
|
||||||
|
- **严格模式**: 启用严格的 TypeScript 检查
|
||||||
|
- **显式类型**: 公共 API 优先使用显式类型注解
|
||||||
|
- **接口**: 对象形状使用接口
|
||||||
|
- **枚举**: 使用常量断言或联合类型代替枚举
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// 好的做法
|
||||||
|
interface TaskOptions {
|
||||||
|
id: number
|
||||||
|
name: string
|
||||||
|
assignee?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
// 简单情况下更好的做法
|
||||||
|
type TaskStatus = 'pending' | 'in-progress' | 'completed'
|
||||||
|
|
||||||
|
// 使用泛型约束
|
||||||
|
function updateTask<T extends Task>(task: T): T {
|
||||||
|
return { ...task, updatedAt: new Date() }
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 📝 提交规范
|
||||||
|
|
||||||
|
我们遵循 [约定式提交](https://www.conventionalcommits.org/zh-hans/) 规范:
|
||||||
|
|
||||||
|
### 提交消息格式
|
||||||
|
|
||||||
|
```
|
||||||
|
<类型>[可选 范围]: <描述>
|
||||||
|
|
||||||
|
[可选 正文]
|
||||||
|
|
||||||
|
[可选 脚注]
|
||||||
|
```
|
||||||
|
|
||||||
|
### 类型
|
||||||
|
|
||||||
|
- **feat**: 新功能
|
||||||
|
- **fix**: 错误修复
|
||||||
|
- **docs**: 文档变更
|
||||||
|
- **style**: 代码风格变更(格式化等)
|
||||||
|
- **refactor**: 代码重构
|
||||||
|
- **perf**: 性能优化
|
||||||
|
- **test**: 添加或更新测试
|
||||||
|
- **chore**: 维护任务
|
||||||
|
|
||||||
|
### 示例
|
||||||
|
|
||||||
|
```bash
|
||||||
|
feat(timeline): 添加缩放功能
|
||||||
|
fix(taskbar): 修复拖拽位置计算问题
|
||||||
|
docs(api): 更新 GanttChart 属性文档
|
||||||
|
style(components): 使用 prettier 格式化代码
|
||||||
|
refactor(composables): 提取公共逻辑到 useGantt
|
||||||
|
perf(timeline): 优化虚拟滚动
|
||||||
|
test(timeline): 为缩放功能添加单元测试
|
||||||
|
chore(deps): 更新 vue 到 3.4.0
|
||||||
|
```
|
||||||
|
|
||||||
|
### 范围指南
|
||||||
|
|
||||||
|
- **components**: Vue 组件
|
||||||
|
- **composables**: Vue 组合式函数
|
||||||
|
- **models**: TypeScript 模型
|
||||||
|
- **styles**: CSS/样式变更
|
||||||
|
- **timeline**: 时间轴相关变更
|
||||||
|
- **taskbar**: 任务条相关变更
|
||||||
|
- **i18n**: 国际化
|
||||||
|
- **demo**: 演示应用
|
||||||
|
- **build**: 构建系统
|
||||||
|
- **ci**: CI/CD 变更
|
||||||
|
|
||||||
|
## 🔄 Pull Request 流程
|
||||||
|
|
||||||
|
### 提交前
|
||||||
|
|
||||||
|
1. **Fork** 仓库
|
||||||
|
2. 从 `main` **创建** 功能分支
|
||||||
|
3. **进行** 变更
|
||||||
|
4. 为新功能 **添加** 测试
|
||||||
|
5. **更新** 文档
|
||||||
|
6. **运行** 代码检查和测试
|
||||||
|
7. 使用约定式提交格式 **提交**
|
||||||
|
|
||||||
|
### PR 检查清单
|
||||||
|
|
||||||
|
- [ ] 代码遵循风格指南
|
||||||
|
- [ ] 完成代码自查
|
||||||
|
- [ ] 为新功能添加测试
|
||||||
|
- [ ] 所有测试通过
|
||||||
|
- [ ] 文档已更新
|
||||||
|
- [ ] 无合并冲突
|
||||||
|
- [ ] 使用约定式提交格式
|
||||||
|
|
||||||
|
### PR 模板
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
## 描述
|
||||||
|
变更的简要描述
|
||||||
|
|
||||||
|
## 变更类型
|
||||||
|
- [ ] 错误修复
|
||||||
|
- [ ] 新功能
|
||||||
|
- [ ] 破坏性变更
|
||||||
|
- [ ] 文档更新
|
||||||
|
|
||||||
|
## 测试
|
||||||
|
- [ ] 单元测试通过
|
||||||
|
- [ ] 手动测试完成
|
||||||
|
- [ ] 演示应用正常工作
|
||||||
|
|
||||||
|
## 截图(如适用)
|
||||||
|
在此添加截图
|
||||||
|
|
||||||
|
## 检查清单
|
||||||
|
- [ ] 代码遵循风格指南
|
||||||
|
- [ ] 完成自查
|
||||||
|
- [ ] 测试已添加/更新
|
||||||
|
- [ ] 文档已更新
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🐛 Issue 指南
|
||||||
|
|
||||||
|
### 错误报告
|
||||||
|
|
||||||
|
使用错误报告模板并包含:
|
||||||
|
|
||||||
|
1. **环境**: 操作系统、浏览器、Node.js 版本
|
||||||
|
2. **重现步骤**: 清晰的编号步骤
|
||||||
|
3. **预期行为**: 应该发生什么
|
||||||
|
4. **实际行为**: 实际发生了什么
|
||||||
|
5. **截图**: 如适用
|
||||||
|
6. **额外上下文**: 其他相关信息
|
||||||
|
|
||||||
|
### 功能建议
|
||||||
|
|
||||||
|
使用功能建议模板并包含:
|
||||||
|
|
||||||
|
1. **问题描述**: 这解决了什么问题?
|
||||||
|
2. **建议解决方案**: 应该如何工作?
|
||||||
|
3. **考虑的替代方案**: 考虑过的其他方法
|
||||||
|
4. **额外上下文**: 原型图、示例等
|
||||||
|
|
||||||
|
## 🧪 测试
|
||||||
|
|
||||||
|
### 编写测试
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// 单元测试示例
|
||||||
|
import { describe, it, expect } from 'vitest'
|
||||||
|
import { mount } from '@vue/test-utils'
|
||||||
|
import GanttChart from '../src/components/GanttChart.vue'
|
||||||
|
|
||||||
|
describe('GanttChart', () => {
|
||||||
|
it('正确渲染任务', () => {
|
||||||
|
const tasks = [
|
||||||
|
{ id: 1, name: '任务 1', startDate: '2025-01-01', endDate: '2025-01-05' }
|
||||||
|
]
|
||||||
|
|
||||||
|
const wrapper = mount(GanttChart, {
|
||||||
|
props: { tasks }
|
||||||
|
})
|
||||||
|
|
||||||
|
expect(wrapper.text()).toContain('任务 1')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
### 测试覆盖率
|
||||||
|
|
||||||
|
- 目标 **80%+ 代码覆盖率**
|
||||||
|
- 彻底测试 **关键功能**
|
||||||
|
- 包含 **边界情况** 和 **错误场景**
|
||||||
|
- 测试 **可访问性** 功能
|
||||||
|
|
||||||
|
## 📚 文档
|
||||||
|
|
||||||
|
### 代码文档
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
/**
|
||||||
|
* 计算任务在时间轴上的位置
|
||||||
|
* @param task - 包含日期信息的任务对象
|
||||||
|
* @param startDate - 时间轴开始日期
|
||||||
|
* @param dayWidth - 一天的像素宽度
|
||||||
|
* @returns 包含左侧位置和宽度的对象
|
||||||
|
*/
|
||||||
|
function calculateTaskPosition(
|
||||||
|
task: Task,
|
||||||
|
startDate: Date,
|
||||||
|
dayWidth: number
|
||||||
|
): { left: number; width: number } {
|
||||||
|
// 实现
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### README 更新
|
||||||
|
|
||||||
|
添加新功能时:
|
||||||
|
|
||||||
|
1. 更新功能列表
|
||||||
|
2. 添加使用示例
|
||||||
|
3. 更新 API 文档
|
||||||
|
4. 如有 UI 变更包含截图
|
||||||
|
|
||||||
|
## 🌍 国际化
|
||||||
|
|
||||||
|
### 添加新语言
|
||||||
|
|
||||||
|
1. 在 `src/composables/useI18n.ts` 中创建语言文件
|
||||||
|
2. 为所有键添加翻译
|
||||||
|
3. 使用新语言测试
|
||||||
|
4. 更新文档
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
// 添加语言示例
|
||||||
|
const messages = {
|
||||||
|
'zh-CN': { /* 中文翻译 */ },
|
||||||
|
'en-US': { /* 英文翻译 */ },
|
||||||
|
'fr-FR': { /* 法文翻译 */ }, // 新语言
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
## 🏷️ 发布流程
|
||||||
|
|
||||||
|
### 版本升级
|
||||||
|
|
||||||
|
我们使用 [语义化版本](https://semver.org/lang/zh-CN/):
|
||||||
|
|
||||||
|
- **主版本**: 破坏性变更
|
||||||
|
- **次版本**: 新功能(向后兼容)
|
||||||
|
- **修订版本**: 错误修复(向后兼容)
|
||||||
|
|
||||||
|
### 发布检查清单
|
||||||
|
|
||||||
|
- [ ] 所有测试通过
|
||||||
|
- [ ] 文档已更新
|
||||||
|
- [ ] CHANGELOG.md 已更新
|
||||||
|
- [ ] package.json 中版本已升级
|
||||||
|
- [ ] Git 标签已创建
|
||||||
|
- [ ] NPM 包已发布
|
||||||
|
- [ ] GitHub 发布已创建
|
||||||
|
|
||||||
|
## 📞 获取帮助
|
||||||
|
|
||||||
|
### 社区支持
|
||||||
|
|
||||||
|
- **GitHub Discussions**: 一般问题和想法
|
||||||
|
- **GitHub Issues**: 错误报告和功能请求
|
||||||
|
- **邮箱**: [ning.li@jordium.com](mailto:ning.li@jordium.com) / [nelson820125@gmail.com](mailto:nelson820125@gmail.com)
|
||||||
|
|
||||||
|
### 维护者响应时间
|
||||||
|
|
||||||
|
- **严重错误**: 24 小时内
|
||||||
|
- **常规问题**: 7 天内
|
||||||
|
- **功能请求**: 14 天内
|
||||||
|
- **Pull Request**: 7 天内
|
||||||
|
|
||||||
|
## 🙏 致谢
|
||||||
|
|
||||||
|
贡献者将会:
|
||||||
|
- 添加到 [贡献者](./CONTRIBUTORS.md) 列表
|
||||||
|
- 在发布说明中提及
|
||||||
|
- 在文档中给予荣誉
|
||||||
|
|
||||||
|
## 📄 许可证
|
||||||
|
|
||||||
|
通过为 jordium-gantt-vue3 做贡献,您同意您的贡献将在 MIT 许可证下授权。
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
**感谢您为 jordium-gantt-vue3 做贡献!🎉**
|
||||||
|
|
||||||
|
您的贡献让这个项目对每个人都变得更好。
|
||||||
210
CONTRIBUTORS-EN.md
Normal file
210
CONTRIBUTORS-EN.md
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# Contributors
|
||||||
|
|
||||||
|
Thank you to all the developers who have contributed to jordium-gantt-vue3! 🎉
|
||||||
|
|
||||||
|
**🌐 Languages**: [📖 English](./CONTRIBUTORS-EN.md) | [📖 中文](./CONTRIBUTORS.md)
|
||||||
|
|
||||||
|
## 🏆 Core Maintainers
|
||||||
|
|
||||||
|
### Project Creator
|
||||||
|
- **[Nelson Li(Github)](https://github.com/nelson820125) / [Nelson Li(Gitee)](https://gitee.com/breathjoy)** - Project creator and lead maintainer
|
||||||
|
- 📧 Email: ning.li@jordium.com / nelson820125@gmail.com
|
||||||
|
- 🏢 Organization: Jordium.com
|
||||||
|
- 💼 Role: Architecture design, core development, project management, product design
|
||||||
|
|
||||||
|
## 🤝 Contributors
|
||||||
|
|
||||||
|
<!--
|
||||||
|
The contributor list will be updated automatically. Please add in the following format:
|
||||||
|
|
||||||
|
### [GitHub Username](GitHub Link)
|
||||||
|
- **Contribution Type**: Code/Documentation/Design/Testing/Translation
|
||||||
|
- **Main Contributions**: Brief description of contributions
|
||||||
|
- **Participation Period**: YYYY-MM
|
||||||
|
|
||||||
|
Example:
|
||||||
|
### [JohnDoe](https://github.com/johndoe)
|
||||||
|
- **Contribution Type**: Code Development
|
||||||
|
- **Main Contributions**: Implemented timeline zoom functionality, fixed drag performance issues
|
||||||
|
- **Participation Period**: 2025-01
|
||||||
|
-->
|
||||||
|
|
||||||
|
*Currently awaiting your first contribution!*
|
||||||
|
|
||||||
|
## 📊 Contribution Statistics
|
||||||
|
|
||||||
|
### Code Contributions
|
||||||
|
- **Total Commits**: To be counted
|
||||||
|
- **Lines of Code**: To be counted
|
||||||
|
- **Features**: To be counted
|
||||||
|
|
||||||
|
### Documentation Contributions
|
||||||
|
- **Documentation Updates**: To be counted
|
||||||
|
- **Translation Work**: To be counted
|
||||||
|
- **Example Code**: To be counted
|
||||||
|
|
||||||
|
## 🎯 Contribution Types
|
||||||
|
|
||||||
|
### 💻 Code Development
|
||||||
|
Developers who contributed to the project's core functionality:
|
||||||
|
- New feature implementation
|
||||||
|
- Bug fixes
|
||||||
|
- Performance optimization
|
||||||
|
- Code refactoring
|
||||||
|
|
||||||
|
### 📚 Documentation Writing
|
||||||
|
Contributors who helped improve project documentation:
|
||||||
|
- API documentation
|
||||||
|
- User guides
|
||||||
|
- Tutorial examples
|
||||||
|
- README updates
|
||||||
|
|
||||||
|
### 🌍 Internationalization
|
||||||
|
Translators who contributed to multi-language support:
|
||||||
|
- Chinese translation
|
||||||
|
- English translation
|
||||||
|
- Other language translations
|
||||||
|
|
||||||
|
### 🎨 Design & Experience
|
||||||
|
Designers who contributed to project design and user experience:
|
||||||
|
- UI/UX design
|
||||||
|
- Icon design
|
||||||
|
- Theme design
|
||||||
|
- Interaction optimization
|
||||||
|
|
||||||
|
### 🧪 Testing & Quality
|
||||||
|
Testers who contributed to project quality assurance:
|
||||||
|
- Unit testing
|
||||||
|
- Integration testing
|
||||||
|
- Performance testing
|
||||||
|
- Compatibility testing
|
||||||
|
|
||||||
|
### 🐛 Issue Reporting
|
||||||
|
Users who contributed to project stability:
|
||||||
|
- Bug reports
|
||||||
|
- Feature suggestions
|
||||||
|
- Usage feedback
|
||||||
|
- Issue reproduction
|
||||||
|
|
||||||
|
## 🏅 Special Recognition
|
||||||
|
|
||||||
|
### 🌟 Outstanding Contribution Award
|
||||||
|
*Outstanding contributors to be selected*
|
||||||
|
|
||||||
|
### 💎 Long-term Contribution Award
|
||||||
|
*Long-term active contributors to be selected*
|
||||||
|
|
||||||
|
### 🚀 Innovation Contribution Award
|
||||||
|
*Innovative contributors to be selected*
|
||||||
|
|
||||||
|
## 📈 Contributor Growth Path
|
||||||
|
|
||||||
|
### 1. New Contributor 🌱
|
||||||
|
- First PR submission
|
||||||
|
- Simple bug fixes
|
||||||
|
- Documentation improvements
|
||||||
|
- Participation in discussions
|
||||||
|
|
||||||
|
### 2. Active Contributor 🌿
|
||||||
|
- Multiple code contributions
|
||||||
|
- Help answer questions
|
||||||
|
- Code review participation
|
||||||
|
- Feature design discussions
|
||||||
|
|
||||||
|
### 3. Core Contributor 🌳
|
||||||
|
- Important feature development
|
||||||
|
- Architecture design participation
|
||||||
|
- Mentoring newcomers
|
||||||
|
- Community building
|
||||||
|
|
||||||
|
### 4. Project Maintainer 🏛️
|
||||||
|
- Codebase maintenance
|
||||||
|
- Release management
|
||||||
|
- Community governance
|
||||||
|
- Strategic planning
|
||||||
|
|
||||||
|
## 🎁 Contributor Benefits
|
||||||
|
|
||||||
|
### Open Source Community Recognition
|
||||||
|
- GitHub Profile showcase
|
||||||
|
- Project website acknowledgment
|
||||||
|
- Social media promotion
|
||||||
|
- Open source resume enhancement
|
||||||
|
|
||||||
|
### Technical Growth Opportunities
|
||||||
|
- Code review guidance
|
||||||
|
- Architecture design discussions
|
||||||
|
- Best practices sharing
|
||||||
|
- Technical exchange opportunities
|
||||||
|
|
||||||
|
### Business Collaboration Opportunities
|
||||||
|
- Priority job recommendations
|
||||||
|
- Commercial project collaboration
|
||||||
|
- Technical consulting invitations
|
||||||
|
- Training instructor opportunities
|
||||||
|
|
||||||
|
## 📝 How to Become a Contributor
|
||||||
|
|
||||||
|
### Step 1: Understand the Project
|
||||||
|
1. Read [README.md](./README.md)
|
||||||
|
2. Review [Contributing Guide](./CONTRIBUTING-EN.md)
|
||||||
|
3. Familiarize with [Coding Standards](./CONTRIBUTING-EN.md#coding-standards)
|
||||||
|
|
||||||
|
### Step 2: Choose Contribution Method
|
||||||
|
1. Browse [Issues](https://github.com/nelson820125/jordium-gantt-vue3/issues)
|
||||||
|
2. Look for `good first issue` labels
|
||||||
|
3. Contact maintainers to discuss ideas
|
||||||
|
|
||||||
|
### Step 3: Start Contributing
|
||||||
|
1. Fork the project repository
|
||||||
|
2. Create a feature branch
|
||||||
|
3. Submit a Pull Request
|
||||||
|
4. Wait for code review
|
||||||
|
|
||||||
|
### Step 4: Continuous Participation
|
||||||
|
1. Respond to review feedback
|
||||||
|
2. Participate in community discussions
|
||||||
|
3. Help other contributors
|
||||||
|
4. Share usage experiences
|
||||||
|
|
||||||
|
## 🤝 Community Code of Conduct
|
||||||
|
|
||||||
|
As contributors to jordium-gantt-vue3, we pledge to:
|
||||||
|
|
||||||
|
### ✅ We Will
|
||||||
|
- Respect different viewpoints and experiences
|
||||||
|
- Gracefully accept constructive criticism
|
||||||
|
- Focus on what's best for the community
|
||||||
|
- Show empathy towards other community members
|
||||||
|
|
||||||
|
### ❌ We Will Not
|
||||||
|
- Use sexualized language or imagery
|
||||||
|
- Make personal attacks or political attacks
|
||||||
|
- Engage in public or private harassment
|
||||||
|
- Publish others' private information
|
||||||
|
|
||||||
|
## 📞 Contact Information
|
||||||
|
|
||||||
|
### Project Maintainers
|
||||||
|
- **Email**: ning.li@jordium.com
|
||||||
|
- **GitHub**: [@nelson820125](https://github.com/nelson820125)
|
||||||
|
|
||||||
|
### Community Discussion
|
||||||
|
- **GitHub Discussions**: [Project Discussion Area](https://github.com/nelson820125/jordium-gantt-vue3/discussions)
|
||||||
|
- **Issues**: [Issue Reports](https://github.com/nelson820125/jordium-gantt-vue3/issues)
|
||||||
|
|
||||||
|
### Business Cooperation
|
||||||
|
- **Business Email**: ning.li@jordium.com
|
||||||
|
- **Technical Consulting**: nelson820125@gmail.com
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🙏 Acknowledgments
|
||||||
|
|
||||||
|
This project exists thanks to all the contributors who participate. Regardless of the size of the contribution, every effort makes this project better!
|
||||||
|
|
||||||
|
**If you have contributed to this project but are not listed here, please let us know through [Issues](https://github.com/nelson820125/jordium-gantt-vue3/issues) or [Pull Request](https://github.com/nelson820125/jordium-gantt-vue3/pulls).**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> 💡 **Join Us**: We always welcome new contributors! Whether you're a beginner or an expert, there are ways to contribute that suit you. Let's make jordium-gantt-vue3 even better together! 🚀
|
||||||
210
CONTRIBUTORS.md
Normal file
210
CONTRIBUTORS.md
Normal file
@@ -0,0 +1,210 @@
|
|||||||
|
# Contributors
|
||||||
|
|
||||||
|
感谢所有为 jordium-gantt-vue3 做出贡献的开发者们!🎉
|
||||||
|
|
||||||
|
**🌐 Languages**: [📖 English](./CONTRIBUTORS-EN.md) | [📖 中文](./CONTRIBUTORS.md)
|
||||||
|
|
||||||
|
## 🏆 核心维护者
|
||||||
|
|
||||||
|
### 项目创建者
|
||||||
|
- **[Nelson Li(Github)](https://github.com/nelson820125) / [Nelson Li(Gitee)](https://gitee.com/breathjoy)** - 项目创建者和主要维护者
|
||||||
|
- 📧 Email: ning.li@jordium.com / nelson820125@gmail.com
|
||||||
|
- 🏢 Organization: Jordium.com
|
||||||
|
- 💼 Role: 架构设计、核心开发、项目管理、产品设计
|
||||||
|
|
||||||
|
## 🤝 贡献者
|
||||||
|
|
||||||
|
<!--
|
||||||
|
贡献者列表将自动更新,请按以下格式添加:
|
||||||
|
|
||||||
|
### [GitHub用户名](GitHub链接)
|
||||||
|
- **贡献类型**: 代码/文档/设计/测试/翻译
|
||||||
|
- **主要贡献**: 简要描述贡献内容
|
||||||
|
- **参与时间**: YYYY-MM
|
||||||
|
|
||||||
|
示例:
|
||||||
|
### [JohnDoe](https://github.com/johndoe)
|
||||||
|
- **贡献类型**: 代码开发
|
||||||
|
- **主要贡献**: 实现了时间轴缩放功能,修复了拖拽性能问题
|
||||||
|
- **参与时间**: 2025-01
|
||||||
|
-->
|
||||||
|
|
||||||
|
*目前正在等待您的第一个贡献!*
|
||||||
|
|
||||||
|
## 📊 贡献统计
|
||||||
|
|
||||||
|
### 代码贡献
|
||||||
|
- **总提交数**: 待统计
|
||||||
|
- **代码行数**: 待统计
|
||||||
|
- **功能特性**: 待统计
|
||||||
|
|
||||||
|
### 文档贡献
|
||||||
|
- **文档更新**: 待统计
|
||||||
|
- **翻译工作**: 待统计
|
||||||
|
- **示例代码**: 待统计
|
||||||
|
|
||||||
|
## 🎯 贡献类型
|
||||||
|
|
||||||
|
### 💻 代码开发
|
||||||
|
为项目核心功能开发做出贡献的开发者:
|
||||||
|
- 新功能实现
|
||||||
|
- Bug 修复
|
||||||
|
- 性能优化
|
||||||
|
- 代码重构
|
||||||
|
|
||||||
|
### 📚 文档编写
|
||||||
|
为项目文档完善做出贡献的贡献者:
|
||||||
|
- API 文档
|
||||||
|
- 使用指南
|
||||||
|
- 教程示例
|
||||||
|
- README 更新
|
||||||
|
|
||||||
|
### 🌍 国际化
|
||||||
|
为项目多语言支持做出贡献的翻译者:
|
||||||
|
- 中文翻译
|
||||||
|
- 英文翻译
|
||||||
|
- 其他语言翻译
|
||||||
|
|
||||||
|
### 🎨 设计与体验
|
||||||
|
为项目设计和用户体验做出贡献的设计师:
|
||||||
|
- UI/UX 设计
|
||||||
|
- 图标设计
|
||||||
|
- 主题设计
|
||||||
|
- 交互优化
|
||||||
|
|
||||||
|
### 🧪 测试质量
|
||||||
|
为项目质量保证做出贡献的测试者:
|
||||||
|
- 单元测试
|
||||||
|
- 集成测试
|
||||||
|
- 性能测试
|
||||||
|
- 兼容性测试
|
||||||
|
|
||||||
|
### 🐛 问题报告
|
||||||
|
为项目稳定性做出贡献的用户:
|
||||||
|
- Bug 报告
|
||||||
|
- 功能建议
|
||||||
|
- 使用反馈
|
||||||
|
- 问题复现
|
||||||
|
|
||||||
|
## 🏅 特别致谢
|
||||||
|
|
||||||
|
### 🌟 突出贡献奖
|
||||||
|
*待评选优秀贡献者*
|
||||||
|
|
||||||
|
### 💎 长期贡献奖
|
||||||
|
*待评选长期活跃贡献者*
|
||||||
|
|
||||||
|
### 🚀 创新贡献奖
|
||||||
|
*待评选创新性贡献者*
|
||||||
|
|
||||||
|
## 📈 贡献者成长路径
|
||||||
|
|
||||||
|
### 1. 新手贡献者 🌱
|
||||||
|
- 第一次提交 PR
|
||||||
|
- 修复简单 Bug
|
||||||
|
- 完善文档
|
||||||
|
- 参与讨论
|
||||||
|
|
||||||
|
### 2. 活跃贡献者 🌿
|
||||||
|
- 多次代码贡献
|
||||||
|
- 帮助解答问题
|
||||||
|
- 代码审查参与
|
||||||
|
- 功能设计讨论
|
||||||
|
|
||||||
|
### 3. 核心贡献者 🌳
|
||||||
|
- 重要功能开发
|
||||||
|
- 架构设计参与
|
||||||
|
- 新人指导
|
||||||
|
- 社区建设
|
||||||
|
|
||||||
|
### 4. 项目维护者 🏛️
|
||||||
|
- 代码库维护
|
||||||
|
- 发布管理
|
||||||
|
- 社区治理
|
||||||
|
- 战略规划
|
||||||
|
|
||||||
|
## 🎁 贡献者权益
|
||||||
|
|
||||||
|
### 开源社区认可
|
||||||
|
- GitHub Profile 展示
|
||||||
|
- 项目官网致谢
|
||||||
|
- 社交媒体宣传
|
||||||
|
- 开源简历加分
|
||||||
|
|
||||||
|
### 技术成长机会
|
||||||
|
- 代码审查指导
|
||||||
|
- 架构设计讨论
|
||||||
|
- 最佳实践分享
|
||||||
|
- 技术交流机会
|
||||||
|
|
||||||
|
### 商业合作机会
|
||||||
|
- 优先推荐职位
|
||||||
|
- 商业项目合作
|
||||||
|
- 技术咨询邀请
|
||||||
|
- 培训讲师机会
|
||||||
|
|
||||||
|
## 📝 如何成为贡献者
|
||||||
|
|
||||||
|
### 第一步:了解项目
|
||||||
|
1. 阅读 [README.md](./README.md)
|
||||||
|
2. 查看 [贡献指南](./CONTRIBUTING.md)
|
||||||
|
3. 熟悉 [代码规范](./CONTRIBUTING.md#编码规范)
|
||||||
|
|
||||||
|
### 第二步:选择贡献方式
|
||||||
|
1. 浏览 [Github Issues](https://github.com/nelson820125/jordium-gantt-vue3/issues) / [Gitee Issues](https://gitee.com/jordium/jordium-gantt-vue3/issues)
|
||||||
|
2. 查看 `good first issue` 标签
|
||||||
|
3. 联系维护者讨论想法
|
||||||
|
|
||||||
|
### 第三步:开始贡献
|
||||||
|
1. Fork 项目仓库
|
||||||
|
2. 创建功能分支
|
||||||
|
3. 提交 Pull Request
|
||||||
|
4. 等待代码审查
|
||||||
|
|
||||||
|
### 第四步:持续参与
|
||||||
|
1. 响应审查意见
|
||||||
|
2. 参与社区讨论
|
||||||
|
3. 帮助其他贡献者
|
||||||
|
4. 分享使用经验
|
||||||
|
|
||||||
|
## 🤝 社区行为准则
|
||||||
|
|
||||||
|
作为 jordium-gantt-vue3 的贡献者,我们承诺:
|
||||||
|
|
||||||
|
### ✅ 我们会
|
||||||
|
- 尊重不同观点和经验
|
||||||
|
- 优雅地接受建设性批评
|
||||||
|
- 专注于对社区最有利的事情
|
||||||
|
- 对其他社区成员表现出同理心
|
||||||
|
|
||||||
|
### ❌ 我们不会
|
||||||
|
- 使用性别化语言或图像
|
||||||
|
- 进行人身攻击或政治攻击
|
||||||
|
- 公开或私下骚扰
|
||||||
|
- 发布他人的私人信息
|
||||||
|
|
||||||
|
## 📞 联系方式
|
||||||
|
|
||||||
|
### 项目维护者
|
||||||
|
- **Email**: ning.li@jordium.com
|
||||||
|
- **GitHub**: [@nelson820125(github)](https://github.com/nelson820125) / [@nelson820125(gitee)](https://gitee.com/breathjoy)
|
||||||
|
|
||||||
|
### 社区讨论
|
||||||
|
- **GitHub Discussions**: [项目讨论区](https://github.com/nelson820125/jordium-gantt-vue3/discussions)
|
||||||
|
- **Issues**: [问题报告Github](https://github.com/nelson820125/jordium-gantt-vue3/issues) / [问题报告Gitee](https://gitee.com/jordium/jordium-gantt-vue3/issues/issues)
|
||||||
|
|
||||||
|
### 商务合作
|
||||||
|
- **商务邮箱**: ning.li@jordium.com / nelson820125@gmail.com
|
||||||
|
- **技术咨询**: ning.li@jordium.com / nelson820125@gmail.com
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## 🙏 致谢信息
|
||||||
|
|
||||||
|
这个项目的存在要感谢所有贡献者的付出。无论贡献大小,每一份努力都让这个项目变得更好!
|
||||||
|
|
||||||
|
**如果您为此项目做出了贡献但未在此列表中,请通过 [Github Issues](https://github.com/nelson820125/jordium-gantt-vue3/issues) / [Gitee Issues](https://gitee.com/jordium/jordium-gantt-vue3/issues/issues) 或 [Pull Request](https://github.com/nelson820125/jordium-gantt-vue3/pulls) 告知我们。**
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
> 💡 **加入我们**: 我们始终欢迎新的贡献者!无论您是初学者还是专家,都有适合您的贡献方式。让我们一起让 jordium-gantt-vue3 变得更加优秀!🚀
|
||||||
16
README-EN.md
16
README-EN.md
@@ -1,5 +1,7 @@
|
|||||||
# jordium-gantt-vue3
|
# jordium-gantt-vue3
|
||||||
|
|
||||||
|
**🌐 Languages**: [📖 English Documentation](./README-EN.md) | [📖 中文文档](./README.md)
|
||||||
|
|
||||||
[](https://badge.fury.io/js/jordium-gantt-vue3)
|
[](https://badge.fury.io/js/jordium-gantt-vue3)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://vuejs.org/)
|
[](https://vuejs.org/)
|
||||||
@@ -7,6 +9,20 @@
|
|||||||
|
|
||||||
> Modern Vue 3 Gantt chart component library providing complete solutions for project management and task scheduling
|
> Modern Vue 3 Gantt chart component library providing complete solutions for project management and task scheduling
|
||||||
|
|
||||||
|
## 🖼️ Demo Show
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 🎨 Theme Support
|
||||||
|
|
||||||
|
### Light Theme
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### Dark Theme
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 🚀 Features
|
## 🚀 Features
|
||||||
|
|
||||||
- 📊 **Complete Functionality**: Task management, milestone tracking, dependency relationships, progress visualization
|
- 📊 **Complete Functionality**: Task management, milestone tracking, dependency relationships, progress visualization
|
||||||
|
|||||||
18
README.md
18
README.md
@@ -1,5 +1,8 @@
|
|||||||
# jordium-gantt-vue3
|
# jordium-gantt-vue3
|
||||||
|
|
||||||
|
<!-- For English documentation, see README-EN.md -->
|
||||||
|
**🌐 Languages**: [📖 English Documentation](./README-EN.md) | [📖 中文文档](./README.md)
|
||||||
|
|
||||||
[](https://badge.fury.io/js/jordium-gantt-vue3)
|
[](https://badge.fury.io/js/jordium-gantt-vue3)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||
[](https://vuejs.org/)
|
[](https://vuejs.org/)
|
||||||
@@ -7,6 +10,21 @@
|
|||||||
|
|
||||||
> 现代化的 Vue 3 甘特图组件库,为项目管理和任务调度提供完整解决方案
|
> 现代化的 Vue 3 甘特图组件库,为项目管理和任务调度提供完整解决方案
|
||||||
|
|
||||||
|
|
||||||
|
## 🖼️ Demo展示
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 🎨 主题支持
|
||||||
|
|
||||||
|
### 亮色主题
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 暗色主题
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
## 🚀 插件特点
|
## 🚀 插件特点
|
||||||
|
|
||||||
- 📊 **完整功能**: 任务管理、里程碑追踪、依赖关系、进度可视化
|
- 📊 **完整功能**: 任务管理、里程碑追踪、依赖关系、进度可视化
|
||||||
|
|||||||
@@ -85,5 +85,10 @@
|
|||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"date": "2025-07-01",
|
"date": "2025-07-01",
|
||||||
"notes": ["增加npm安装及组件集成示例"]
|
"notes": ["增加npm安装及组件集成示例"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.0.2",
|
||||||
|
"date": "2025-07-01",
|
||||||
|
"notes": ["升级README文档", "增加贡献说明", "增加贡献者列表"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "jordium-gantt-vue3",
|
"name": "jordium-gantt-vue3",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "dist/jordium-gantt-vue3.cjs.js",
|
"main": "dist/jordium-gantt-vue3.cjs.js",
|
||||||
"module": "dist/jordium-gantt-vue3.es.js",
|
"module": "dist/jordium-gantt-vue3.es.js",
|
||||||
|
|||||||
@@ -84,6 +84,11 @@
|
|||||||
{
|
{
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"date": "2025-07-01",
|
"date": "2025-07-01",
|
||||||
"notes": ["增加NPM引用示例"]
|
"notes": ["增加npm安装及组件集成示例"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "1.0.2",
|
||||||
|
"date": "2025-07-01",
|
||||||
|
"notes": ["升级README文档", "增加贡献说明", "增加贡献者列表"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user