绑定选项的代码该怎么写?像下面的代码这样写对不对?另外图中出现两个按钮,能否只保留一个?
var cellB = [{
imageType: GC.Spread.Sheets.ButtonImageType.dropdown,
command: "openList",
useButtonStyle: false,
dropDowns: {
type: GC.Spread.Sheets.DropDownType.list,
option: {
items: [
{
text: 'item1',
value: 'item1'
},
{
text: 'item2',
value: 'item2'
},
{
text: 'item3',
value: 'item3'
},
{
text: 'item4',
value: 'item4'
}
],
}
}
},
{
imageType: GC.Spread.Sheets.ButtonImageType.dropdown,
command: (sheet, row, col, option) => {
console.log(option);
}
}];
sheet.getRange(1, 1, 5, 1).cellButtons(cellB);
|