zmdms-webui 0.0.182 → 1.0.0

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.
@@ -11,8 +11,10 @@ function createWatermark(watermarkText, options, container) {
11
11
  var rotatedWidth = cos * watermarkWidth + sin * watermarkHeight;
12
12
  var rotatedHeight = sin * watermarkWidth + cos * watermarkHeight;
13
13
  // 计算容器可以容纳多少行和列的水印
14
- var cols = Math.floor((container.offsetWidth || 600) / rotatedWidth);
15
- var rows = Math.floor((container.offsetHeight || 600) / rotatedHeight);
14
+ var containerWidth = Math.max(container.offsetWidth || 1200, document.body.clientWidth);
15
+ var containerHeight = Math.max(container.offsetHeight || 1200, document.body.clientHeight);
16
+ var cols = Math.ceil(containerWidth / rotatedWidth);
17
+ var rows = Math.ceil(containerHeight / rotatedHeight);
16
18
  // 创建一个水印元素
17
19
  var fragment = document.createDocumentFragment();
18
20
  // 循环创建和定位水印元素
@@ -103,6 +103,7 @@ var WatermarkShadow = function (props, ref) {
103
103
  zIndex: zIndex,
104
104
  position: "absolute",
105
105
  visibility: "visible",
106
+ overflow: "hidden",
106
107
  left: 0,
107
108
  top: 0,
108
109
  width: "100%",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zmdms-webui",
3
- "version": "0.0.182",
3
+ "version": "1.0.0",
4
4
  "private": false,
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",