【发布时间】:2021-09-08 09:08:19
【问题描述】:
如何在 extJS 树形面板中显示图像而不是文本。
我正在使用拖放特性。那里我正在使用treeviewdragdrop 方法。
现在我想显示一些图像而不是文本。
这是我的代码。
{
xtype: 'treepanel',
align: 'stretch',
rootVisible : false,
title:'My Tree',
useArrows: true,
hideHeaders: true,
scrollable: true,
autoScroll: true,
loadMask: {
msg: 'Loading'
},
copy: true,
rootVisible: false,
viewConfig: {
plugins: {
ddGroup: 'grid-to-form',
ptype: 'treeviewdragdrop',
appendOnly: true,
sortOnDrop: true,
enableDrag: true,
containerScroll: true,
allowParentInsert: false,
allowContainerDrops: false
}
},
store: Ext.create('Ext.data.TreeStore', {
root: {
expanded: true,
"text": ".",
"children": [{
"item": "Box",
"iconCls": "tree-grid-task"
},
{
"item": "Date",
"iconCls": "tree-grid-task"
},
{
"item": "Number",
"iconCls": "tree-grid-task"
},
{
"item": "Text",
"iconCls": "tree-grid-task"
},
{
"item": "Field",
"editable":true
}]
}
}),
columns: [{
xtype: 'treecolumn',
text: '',
dataIndex: 'item',
flex: 2,
sortable: true
}]
}
【问题讨论】:
标签: javascript extjs extjs6