这个方法支持15.1.0版本么?用他报错:Cannot read properties of undefined (reading 'addPictureShape')。 代码:setPic(sheet, pic, index, high) {
let row = index
sheet.addSpan(row, 1, 1, 6);
sheet.setRowHeight(row, 450);
var xhr = new XMLHttpRequest();
xhr.onload = function () {
var reader = new FileReader();
reader.onloadend = function () {
console.log("high", high)
var picture = sheet.shapes.addPictureShape(pic.path, reader.result, 100, 100, 200, 200);
// sheet.pictures.add(pic.path, reader.result, 40, high, 450, 450);
}
reader.readAsDataURL(xhr.response);
};
xhr.open('GET', this.getFileAccessHttpUrl(pic.path));
xhr.responseType = 'blob';
xhr.send();
sheet.addSpan(row + 1, 1, 1, 6);
sheet.getCell(row + 1, 1).value(pic.path).font("normal normal 12px simkai").hAlign(GC.Spread.Sheets.HorizontalAlign.center).vAlign(GC.Spread.Sheets.VerticalAlign.top);
sheet.setRowHeight(row + 1, 40);
}, |