|
var spreadsheet = this.$refs.spreadsheet;
spreadsheet.addToolbarItems(
"Home",
[
{ type: "Separator" },
{ text: "Auto Sum", id: "custom_btn", tooltipText: "Auto Sum" },
],
33
);
spreadsheet.updateCell({ formula: "=SUM(B1:B3)" }, "B4");
|
|
methods: {
created: function () {
this.$refs.spreadsheet.addToolbarItems(
"Home",
[
{ type: "Separator" },
{
text: "Auto Sum",
id: "custom_btn",
tooltipText: "Auto Sum",
click: this.btnClick,
},
],
31
);
},
btnClick: function () {
this.$refs.spreadsheet.updateCell({ formula: "=SUM(B1:B3)" }, "B4");
},
}
|