V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
chenzhe
V2EX  ›  问与答

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

  •  
  •   chenzhe ·
    PRO
    · Jun 23, 2022 · 862 views
    This topic created in 1417 days ago, the information mentioned may be changed or developed.
    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=

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   878 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 20:15 · PVG 04:15 · LAX 13:15 · JFK 16:15
    ♥ Do have faith in what you're doing.