vxe-gantt 4.4.5 → 4.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -116,6 +116,49 @@ import 'vxe-gantt/lib/style.css'
116
116
  createApp(App).use(VxeUIBase).use(VxeUITable).use(VxeUIGantt).mount('#app')
117
117
  ```
118
118
 
119
+ ## 示例
120
+
121
+ ```html
122
+ <template>
123
+ <div>
124
+ <vxe-gantt v-bind="ganttOptions"></vxe-gantt>
125
+ </div>
126
+ </template>
127
+
128
+ <script>
129
+ export default {
130
+ data() {
131
+ const ganttOptions = {
132
+ border: true,
133
+ taskBarConfig: {
134
+ showProgress: true
135
+ },
136
+ columns: [
137
+ { field: 'title', title: '任务名称' },
138
+ { field: 'start', title: '开始时间', width: 100 },
139
+ { field: 'end', title: '结束时间', width: 100 }
140
+ ],
141
+ data: [
142
+ { id: 10001, title: 'A项目', start: '2024-03-01', end: '2024-03-04', progress: 3 },
143
+ { id: 10002, title: '城市道路修理进度', start: '2024-03-03', end: '2024-03-08', progress: 10 },
144
+ { id: 10003, title: 'B大工程', start: '2024-03-03', end: '2024-03-11', progress: 90 },
145
+ { id: 10004, title: '超级大工程', start: '2024-03-05', end: '2024-03-11', progress: 15 },
146
+ { id: 10005, title: '地球净化项目', start: '2024-03-08', end: '2024-03-15', progress: 100 },
147
+ { id: 10006, title: '一个小目标项目', start: '2024-03-10', end: '2024-03-21', progress: 5 },
148
+ { id: 10007, title: '某某计划', start: '2024-03-15', end: '2024-03-24', progress: 70 },
149
+ { id: 10008, title: '某某科技项目', start: '2024-03-20', end: '2024-03-29', progress: 50 },
150
+ { id: 10009, title: '地铁建设工程', start: '2024-03-19', end: '2024-03-20', progress: 5 },
151
+ { id: 10010, title: '铁路修建计划', start: '2024-03-12', end: '2024-03-20', progress: 10 }
152
+ ]
153
+ }
154
+ return {
155
+ ganttOptions
156
+ }
157
+ }
158
+ }
159
+ </script>
160
+ ```
161
+
119
162
  ## License
120
163
 
121
164
  [MIT](LICENSE) © 2025-present, Xu Liangzhan