dpot-ui 0.5.9 → 0.5.11
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.es.js +5 -8
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -25458,14 +25458,11 @@ const ap = {
|
|
|
25458
25458
|
t.title && o === 1 ? o.height = Math.max((t.style || {}).fontSize * 1.5 || 24, e) : o.height = t.rowHeight || e;
|
|
25459
25459
|
}), t.waterText) {
|
|
25460
25460
|
const o = document.createElement("canvas");
|
|
25461
|
-
o.width = Math.
|
|
25462
|
-
const s = o.getContext("2d"), a =
|
|
25463
|
-
s.font =
|
|
25464
|
-
|
|
25465
|
-
|
|
25466
|
-
s.fillText(t.waterText, b, p);
|
|
25467
|
-
const d = o.toDataURL("image/png").replace(/^data:image\/[a-z]+;base64,/, ""), h = i.addImage({ base64: d, extension: "png" }), f = t.body[t.body.length - 1], m = f[f.length - 1];
|
|
25468
|
-
n.addImage(h, `A1:${m[m.length - 1]._gps_}`);
|
|
25461
|
+
o.width = Math.max(t.waterText.length, 5) * (parseInt((t.waterStyle || {}).font) || 24) * 1.5, o.height = o.width;
|
|
25462
|
+
const s = o.getContext("2d"), a = t.waterStyle || { font: "24px Arial", fillStyle: "rgba(0, 0, 0, 0.1)", textAlign: "center", textBaseline: "middle" };
|
|
25463
|
+
s.font = a.font, s.fillStyle = a.fillStyle, s.textAlign = a.textAlign, s.textBaseline = a.textBaseline, s.translate(0, 0), s.rotate(-45 * Math.PI / 180), s.fillText(t.waterText, 10, o.height - 10);
|
|
25464
|
+
const l = o.toDataURL("image/png").replace(/^data:image\/[a-z]+;base64,/, ""), r = i.addImage({ base64: l, extension: "png" });
|
|
25465
|
+
n.addBackgroundImage(r);
|
|
25469
25466
|
}
|
|
25470
25467
|
}), i.xlsx.writeBuffer().then((t) => {
|
|
25471
25468
|
ip.saveAs(new Blob([t], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }), this.fileName);
|