本帖最后由 Joestar.Xu 于 2023-11-2 10:29 编辑
产品:SpreadJS
版本:16.2.2
[size=13.0667px] let sheetDataSource = sheet.getDataSource();
[size=13.0667px] if (sheetDataSource == null) {
[size=13.0667px] sheetDataSource = {"areaProtection": areaProtection};
[size=13.0667px] } else {
[size=13.0667px] sheetDataSource['areaProtection'] = areaProtection;
[size=13.0667px] }
[size=13.0667px] sheet.setDataSource(sheetDataSource);
[size=13.0667px]
[size=13.0667px]每次第一次执行[size=13.0667px] [size=13.0667px]sheet.setDataSource(sheetDataSource);会报错,数据源不支持,我再执行一次又能正常绑定
|
|