V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
chenzhe
V2EX  ›  问与答

用 ant design 的 proComponents 遇到了点儿问题,求解答

  •  
  •   chenzhe · 2022-06-23 23:44:02 +08:00 · 534 次点击
    这是一个创建于 734 天前的主题,其中的信息可能已经有所发展或是发生改变。
    type colorType = {
      name:string,
      pic?:string
    }
    
    type deviceModelType = {
      brand:string,
      name:string,
      modelName?:string,
      colors?:colorType[]
    }
    

    期望得到的数据结构是 deviceModelType 这样的 例如:

    {
      brand:"62b04edaf11d198dc68469e5",
      name:"iPhone 13",
      colors:[
        {
          name:'星空色',
          pic:'https://link_1.to.pic'
        },
        {
          name:'蓝色',
          pic:'https://link_2.to.pic'
        }
      ]
    }
    

    目前写了的代码

    现在遇到的问题

    1 、在可编辑表格中,添加一行新的内容时,上传图片后无法获得服务器响应回来的数据。

    2 、当添加第二行可编辑表格时,第二行的图片上传控件和第一行的图片上传控件好像是同一个实体。

    希望能够大佬可以帮忙看看该如何解决。

    期待回帖指教 或者 aHR0cHM6Ly90Lm1lL0B6b29fZWxlcGhhbnQ=

    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3887 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 01:01 · PVG 09:01 · LAX 18:01 · JFK 21:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.