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

[前端] 各位大佬,最近老是需要在项目里使用嵌套的对象给页面赋初始值,甚烦,有什么优美点的解决方案吗

  •  
  •   ghostgril · Jan 22, 2018 · 982 views
    This topic created in 3019 days ago, the information mentioned may be changed or developed.
    因为需要给页面初始化值所以总是需要从保存的数据里获取值进行赋值,但是又不能修改保存好的数据,每次赋值都超恶心,因为要保证深度克隆。除了递归之外你们是怎么解决的呢?
    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5505 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 08:46 · PVG 16:46 · LAX 01:46 · JFK 04:46
    ♥ Do have faith in what you're doing.