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.
翻譯
collapsed 與 confirmKeyRemove 建構子選項現在能正確傳遞至所有子節點,包含初始 JSON 解析時與執行期間新增節點時。此外,confirmKeyRemove: false 現在能實際跳過刪除確認對話框,此前該對話框為硬編碼、永遠顯示。
Changes
FEAT
- Propagate
collapsedandconfirmKeyRemoveconfig options to all nodes created in#jsonToChildren()for both array and object entries - Propagate
collapsedandconfirmKeyRemoveto nodes created viainsert() - Respect
confirmKeyRemove: falseinJSONEditorNodeto bypass the remove confirmation dialog
翻譯
- 在
#jsonToChildren()中對陣列與物件條目創建的所有節點傳遞collapsed與confirmKeyRemove設定 - 透過
insert()創建的節點同樣傳遞collapsed與confirmKeyRemove JSONEditorNode現在實際尊重confirmKeyRemove: false設定,可跳過刪除確認對話框
REFACTOR
- Introduce
#configprivate field inJSONEditorto persist constructor config, replacing the pattern of passingconfigas 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