Skip to content
This repository was archived by the owner on Nov 4, 2026. It is now read-only.
This repository was archived by the owner on Nov 4, 2026. It is now read-only.

ViewConfigPanel 保存后持久化draft配置到后端(DataSource updateViewConfig) #673

Closed

Description

@hotlong

问题说明

当前ViewConfigPanel的配置变更仅保存在本地draft(useState),无法持久化到后端。页面刷新或切换视图会导致个性化配置丢失。

目标/建议

  • 在 handleViewConfigSave 回调中,调用 dataSource.updateViewConfig(接口需补充/定义)将draft view配置提交,保证保存后任何刷新/切换都能还原用户最新配置
  • 若 dataSource 未提供 updateViewConfig 方法(兼容老后端),仅本地存储并弹窗提示或打印警告
  • 对接口定义,建议参照:
    interface DataSource {
      updateViewConfig?(objectName: string, viewId: string, config: Record<string, any>): Promise<void>;
    }
  • 成功保存后应重新拉取views/view config,前端状态保持刷新

验收/测试点

  • 保存后draft配置可跨页面刷新还原
  • dataSource无此方法时给出友好提示/console.warn
  • 单测模拟该保存流程

/cc @hotlong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

configurationenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions