rapid-spreadjs 1.0.54 → 1.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +5 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/utils/sheet.d.ts +3 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -542,9 +542,10 @@ const SheetUtils = {
|
|
|
542
542
|
* 设置当前活动工作表的水印和数据绑定是否显示
|
|
543
543
|
* @param spread 工作簿实例
|
|
544
544
|
* @param cells 数据绑定单元格配置集合([{ row: number; col: number; title: string; pathPrev: string; pathField: string }])
|
|
545
|
-
* @param isShow
|
|
545
|
+
* @param isShow 是否显示水印
|
|
546
|
+
* @param isShowBindPath 是否显示数据绑定路径,默认为:true
|
|
546
547
|
*/
|
|
547
|
-
setActiveSheetWatermark: (spread, cells,
|
|
548
|
+
setActiveSheetWatermark: (spread, cells, isShowWatermark, isShowBindPath = true) => {
|
|
548
549
|
if (cells == null || cells == undefined) {
|
|
549
550
|
return;
|
|
550
551
|
}
|
|
@@ -553,9 +554,9 @@ const SheetUtils = {
|
|
|
553
554
|
sheet.suspendPaint();
|
|
554
555
|
cells.forEach((cell) => {
|
|
555
556
|
// 设置或移除水印标签
|
|
556
|
-
sheet.getCell(cell.row, cell.col).watermark(
|
|
557
|
+
sheet.getCell(cell.row, cell.col).watermark(isShowWatermark ? `{${cell.title}}` : undefined);
|
|
557
558
|
// 设置或移除绑定路径
|
|
558
|
-
sheet.setBindingPath(cell.row, cell.col,
|
|
559
|
+
sheet.setBindingPath(cell.row, cell.col, isShowBindPath ? `${cell.pathPrev}.${cell.pathField}` : undefined);
|
|
559
560
|
});
|
|
560
561
|
// 恢复绘制
|
|
561
562
|
sheet.resumePaint();
|