- boshspread1(spread) {
- this.valData1 = spread;
- let sheet = this.valData1.getActiveSheet();
- let defaultStyle = sheet.getDefaultStyle();
- defaultStyle.locked = true;
- sheet.setDefaultStyle(defaultStyle);
- if (this.isAdmin == true) {
- this.valData1.options.isProtected = true;
- // sheet.options.protectionOptions.allowSelectLockedCells = false;
- console.log(sheet, defaultStyle)
- }
- },
复制代码
locked 等于true时候将ispRrotected设置成true,表单依然可以编辑。
|
|