|
@@ -14,7 +14,7 @@ const domSymbol = Symbol("watermark-dom");
|
|
|
export function useWatermark(
|
|
|
appendEl: Ref<HTMLElement | null> = ref(document.body)
|
|
|
) {
|
|
|
- let func: Fn = () => {};
|
|
|
+ let func: Fn = () => { };
|
|
|
const id = domSymbol.toString();
|
|
|
|
|
|
|
|
@@ -38,7 +38,7 @@ export function useWatermark(
|
|
|
if (cans) {
|
|
|
cans.rotate((-20 * Math.PI) / 120);
|
|
|
cans.font = "30px Vedana";
|
|
|
- cans.fillStyle = "rgba(0, 0, 0, 0.15)";
|
|
|
+ cans.fillStyle = "rgba(0, 0, 0, 0.06)";
|
|
|
cans.textAlign = "left";
|
|
|
cans.textBaseline = "middle";
|
|
|
cans.fillText(str, can.width / 20, can.height);
|
|
@@ -62,7 +62,7 @@ export function useWatermark(
|
|
|
const MutationObserver =
|
|
|
window.MutationObserver || window.WebKitMutationObserver;
|
|
|
if (MutationObserver) {
|
|
|
- let mo: any = new MutationObserver(function() {
|
|
|
+ let mo: any = new MutationObserver(function () {
|
|
|
const __wm = document.getElementById(id);
|
|
|
if (!__wm) {
|
|
|
mo.disconnect();
|