Quellcode durchsuchen

添加 cl-watermark 水印组件

icssoa vor 5 Monaten
Ursprung
Commit
0d76580fbb
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  1. 4 0
      uni_modules/cool-ui/components/cl-watermark/cl-watermark.uvue

+ 4 - 0
uni_modules/cool-ui/components/cl-watermark/cl-watermark.uvue

@@ -180,12 +180,16 @@ async function drawWatermark() {
 			drawCtx.canvas.height = containerHeight.value;
 
 			// 清空画布
+			// #ifdef APP
 			drawCtx.reset();
+			// #endif
 			drawCtx.clearRect(0, 0, containerWidth.value, containerHeight.value);
 
 			// 缩放画布以适配高分屏
+			// #ifdef APP
 			const ratio = getDevicePixelRatio();
 			drawCtx.scale(ratio, ratio);
+			// #endif
 
 			// 设置全局透明度
 			drawCtx.globalAlpha = props.opacity;