feat(plugin): P2-4 数据导入导出 — 后端 export/import API + 前端 UI + TS 修复
- data_service: export 方法查询匹配行(上限10000),import 方法逐行校验+插入 - data_handler: export_plugin_data / import_plugin_data 处理函数 - module: 注册 GET /export + POST /import 路由 - pluginData.ts: exportPluginData / importPluginData API 函数 - PluginCRUDPage: 根据 entity importable/exportable 标志显示导出/导入按钮 - PluginMarket: 修复 TS 错误 (unused imports, type narrowing) - PluginSettingsForm: 修复 TS 错误 (Rule type, Divider orientation)
This commit is contained in:
@@ -113,6 +113,15 @@ impl PluginModule {
|
||||
.route(
|
||||
"/plugins/{plugin_id}/{entity}/resolve-labels",
|
||||
post(crate::handler::data_handler::resolve_ref_labels::<S>),
|
||||
)
|
||||
// 数据导入导出
|
||||
.route(
|
||||
"/plugins/{plugin_id}/{entity}/export",
|
||||
get(crate::handler::data_handler::export_plugin_data::<S>),
|
||||
)
|
||||
.route(
|
||||
"/plugins/{plugin_id}/{entity}/import",
|
||||
post(crate::handler::data_handler::import_plugin_data::<S>),
|
||||
);
|
||||
|
||||
// 实体注册表路由
|
||||
|
||||
Reference in New Issue
Block a user