Skip to content

v1.2.0

Latest

Choose a tag to compare

@pardnchiu pardnchiu released this 20 Feb 10:07

v1.1.7 -> v1.2.0

Summary

collapsed and confirmKeyRemove constructor options now propagate correctly to all child nodes — both during initial JSON parsing and when inserting new nodes at runtime. Additionally, confirmKeyRemove: false now actually suppresses the remove confirmation dialog, which was previously hardcoded to always appear.

翻譯

collapsedconfirmKeyRemove 建構子選項現在能正確傳遞至所有子節點,包含初始 JSON 解析時與執行期間新增節點時。此外,confirmKeyRemove: false 現在能實際跳過刪除確認對話框,此前該對話框為硬編碼、永遠顯示。

Changes

FEAT

  • Propagate collapsed and confirmKeyRemove config options to all nodes created in #jsonToChildren() for both array and object entries
  • Propagate collapsed and confirmKeyRemove to nodes created via insert()
  • Respect confirmKeyRemove: false in JSONEditorNode to bypass the remove confirmation dialog
翻譯
  • #jsonToChildren() 中對陣列與物件條目創建的所有節點傳遞 collapsedconfirmKeyRemove 設定
  • 透過 insert() 創建的節點同樣傳遞 collapsedconfirmKeyRemove
  • JSONEditorNode 現在實際尊重 confirmKeyRemove: false 設定,可跳過刪除確認對話框

REFACTOR

  • Introduce #config private field in JSONEditor to persist constructor config, replacing the pattern of passing config as an argument to #init()
  • Remove trailing semicolons on class method definitions and standardize arrow function parameter style across both model files
翻譯
  • JSONEditor 中引入 #config 私有欄位持久化建構子設定,取代將 config 作為參數傳入 #init() 的模式
  • 移除類別方法定義的尾部分號,並統一兩個 Model 檔案中箭頭函式的參數風格

Files Changed

File Status Tag
src/model/JSONEditor.js Modified FEAT, REFACTOR
src/model/JSONEditorNode.js Modified FEAT, REFACTOR
dist/NanoJSON.js Modified FEAT
dist/NanoJSON.esm.js Modified FEAT
doc.md Added DOC
doc.zh.md Added DOC
README.md Modified DOC
README.zh.md Modified DOC
update.md Deleted DOC
package.json Modified CHORE
page/live.html Modified STYLE

Generated by SKILL