• Data Governance Dev's avatar
    refactor(web2): store + 兜底配置改为列表结构 — 多连接支持 · 934865dd
    Data Governance Dev authored
    - dbPresets.js:DB_PRESETS 改为列表结构(每 db_type 是 Connection[])
    - useDbConnection.js
      - state.currentType: string → state.currentConnection: {db_type, id}
      - presets[db_type] 从单 dict 改为 Connection[]
      - 新增 currentType computed(便捷暴露 db_type)
      - 新增 setCurrentConnection(db_type, id) 替代 setDbType(type)
      - localStorage 新 key web2.dbConnection.current,序列化用 "db_type::id"
      - API 拉回后校准:当前连接丢失则 fallback 到第一个连接
    934865dd
dbPresets.js 2.33 KB