本帖最后由 Wilson.Zhang 于 2024-8-29 16:22 编辑
产品:SpreadJS
版本:17.0.2
调研编号:SJS-24802
Last Review:2024-08-29
当前进展:在调研中。
类: Comment
- const comment = sheet.comments.get(row, col);
- if (comment) {
- const line = countSubString(comment.text(), Constants.SPREADJS_BREAK) + 1;
- comment.backColor('white');
- comment.width(300);
- comment.height(16 * line + 30);
- comment.fontFamily('Meiryo UI');
- comment.fontSize('14px');
- comment.padding(new GC.Spread.Sheets.Comments.Padding(5, 5, 5, 12));
- comment.horizontalAlign(GC.Spread.Sheets.HorizontalAlign.distributed);
- comment.dynamicSize(false);
- // set indicatorSize
- comment.indicatorSize(2); // 6 as default
- // set indicator Color
- const defaultStyle = sheet.getActualStyle(row, col);
- comment.indicatorColor(typeof defaultStyle.backColor === 'string' ? defaultStyle.backColor : 'red'); // 'red' as default
- }
复制代码
设定固定的宽和高以后
弹出的Comment在靠近画面的边缘时,comment的高和宽度仍然变化
可以通过
https://demo.grapecity.com.cn/sp ... comment-setting/vue验证
|
|