ascoders / gaea-editor

Design websites in your browser. A smart web editor!
https://gaeajs.github.io/gaea-site/
MIT License
1.34k stars 222 forks source link

修正 array 插件数据编辑问题 #55

Closed zongwei007 closed 5 years ago

zongwei007 commented 5 years ago

与 #37 是同一个问题。当前 array 类型在编辑默认属性时,由于默认属性混合的处理方式,导致以下现象:

  1. 无法删除默认属性。减少数组元素数量后,又会被 _.mergeWith 给还原。
  2. 当存在 [{ "title": "foo"}] 这样的数据结构时,修改任意数据都会导致其余默认值丢失。

我的解决方式:

这个问题对 gaea-render 也有影响。