https://github.com/mariohmol/ang-jsoneditor。
我已將上述庫用于 jsoneditor。這里我將樹視圖作為默認視圖。但我想要代碼視圖。如何設定它以及在哪里更改它。我在檢查中找到 html 元素,但在代碼中我沒有找到它們. 頁面加載時出現此處的樹視圖
uj5u.com熱心網友回復:
const container = document.getElementById("id_editor");
var options = {
modes: ['code', 'tree'],
mode: "code",
};
const editor = new JSONEditor(container, options);
注意選項字典中的模式鍵(NOT MODES)。
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/465050.html
