dojo 需要某些 css 字段,我相信这些字段如下:
我的CSS:
.configButton .dijitButtonNode {
background-image: url(../images/gear16.png);
background-position: center center;
background-repeat: no-repeat;
width: 16px;
height: 16px;
}
我的部分结构:
{ id: 'config', field: 'config', name: 'Config', width: '61px',
widgetsInCell: true,
navigable: true,
allowEventBubble: true,
decorator: function(){
//Generate cell widget template string
return [
'<button data-dojo-type="dijit.form.Button" ',
'data-dojo-attach-point="btn3" ',
'class="configButton" ',
'data-dojo-props="onClick: function(){',
'alert(\'Configuration\');',
'}"></button>'
].join('');
},
setCellValue: function(data){
//"this" is the cell widget
this.btn3.set('label3', data);
}
}
我无法让我的按钮正常工作,尤其是图标图像。我的 GridX 单元格中只有一个折叠按钮。
最佳答案
试试这段代码:
setCellValue: function(gridData, storeData, cellWidget){
cellWidget.btn3.set('label3', data);
}
关于css - 如何让我的 css 为我的 dojo dijit 表单按钮正常工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26765919/