2017-01-04 16 views
2
function abc() { 
    var legend = [{ 
     "test": "adbc.tiff" 
    }, { 
     "test": "CD.tiff" 
    }, { 
     "test": "sec_color" 
    }]; 

    $("#local_tree").jstree({ 

     'core': { 
     'data': [{ 
      "text": "Tiff Files", 
      "children": legend 
     }] 
     }, 
     "checkbox": { 
     "keep_selected_style": false 
     }, 
     "plugins": ["checkbox"] 
    }); 
} 

「adbc.tiff」のようなアイコンではなく、アイコンが表示されるのはわかりません。 'CD.tiff 3'フォルダは表示されますが、名前は表示されません。jstreeにフォルダ名が表示されません。アイコンだけが表示されます

答えて

2

表示する文字列を定義するプロパティは、testではなく、textです。

// use text: "...", not test: "..." 
var legend = [{ 
    "text": "adbc.tiff" 
}, { 
    "text": "CD.tiff" 
}, { 
    "text": "sec_color" 
}]; 
+1

:p ....ありがとうございました...愚かな間違い.... –

関連する問題