feat(web): Kanban 看板页面 — dnd-kit 拖拽 + 跨列移动

- 新增 PluginKanbanPage 看板页面,支持 dnd-kit 拖拽
- 支持泳道分组、卡片标题/副标题/标签展示
- 乐观更新 UI,失败自动回滚
- 路由入口 /plugins/:pluginId/kanban/:entityName 自加载 schema
- PluginTabsPage 新增 kanban 页面类型支持
- PluginStore 新增 kanban 菜单项和路由生成
- 安装 @dnd-kit/core + @dnd-kit/sortable
This commit is contained in:
iven
2026-04-17 11:00:52 +08:00
parent c487a94f19
commit c9a58e9d34
6 changed files with 423 additions and 3 deletions

View File

@@ -8,7 +8,7 @@ export interface PluginMenuItem {
label: string;
pluginId: string;
entity?: string;
pageType: 'crud' | 'tree' | 'tabs' | 'detail' | 'graph' | 'dashboard';
pageType: 'crud' | 'tree' | 'tabs' | 'detail' | 'graph' | 'dashboard' | 'kanban';
}
export interface PluginMenuGroup {
@@ -128,6 +128,15 @@ export const usePluginStore = create<PluginStore>((set, get) => ({
pluginId: plugin.id,
pageType: 'dashboard' as const,
});
} else if (page.type === 'kanban') {
items.push({
key: `/plugins/${plugin.id}/kanban/${page.entity}`,
icon: 'UnorderedListOutlined',
label: page.label,
pluginId: plugin.id,
entity: page.entity,
pageType: 'kanban' as const,
});
}
// detail 类型不生成菜单项
}