找回密码
 立即注册

QQ登录

只需一步,快速开始

yinuo

注册会员

1

主题

1

帖子

4

积分

注册会员

积分
4
  • 12

    金币

  • 1

    主题

  • 1

    帖子

最新发帖
yinuo
注册会员   /  发表于:2021-10-18 14:26  /   查看:1799  /  回复:1
本帖最后由 yinuo 于 2021-10-18 15:22 编辑

let sheet = spread.getActiveSheet();
let style = new GC.Spread.Sheets.Style();
style.locked = true;
style.cellPadding = '1 10 1 10';
sheet.setDefaultStyle(style, GC.Spread.Sheets.SheetArea.viewport);
sheet.options.protectionOptions = {
    allowSelectLockedCells: true,
    allowFilter: true,
    allowSort: false,
    allowResizeColumns:true,
    allowResizeRows:true,
    allowInsertRows: false,
    allowInsertColumns: false,
    allowDeleteRows: false,
    allowDeleteColumns: false,
    allowEditObjects: true
};
sheet.options.isProtected = true;
// 行列冻结
sheet.frozenRowCount(2);
sheet.frozenColumnCount(7);
DataCache.getInstance().add('sheet', sheet);

1 个回复

倒序浏览
Derrick.Jiao讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-10-18 16:58:27
沙发
这边根据你提供的代码未能复现你的问题,请在此demo中复现你的问题并提供给我们

data.html

2.09 KB, 下载次数: 34

回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部