Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vue3.0 项目引用watermark-dom,本地可以正常显示,但是线上无显示效果 #110

Open
Yuanqiumei opened this issue Oct 10, 2022 · 1 comment

Comments

@Yuanqiumei
Copy link

Yuanqiumei commented Oct 10, 2022

const watermarkInit = () => {
nextTick(() => {
watermark.init({
watermark_txt: "知能英语", //水印的内容
watermark_parent_node: "learn-parent", //水印插件挂载的父元素element,不输入则默认挂在body上
watermark_fontsize: "24px", //水印字体大小
watermark_alpha: 0.08, //水印透明度,要求设置在大于等于0.005
watermark_angle: 45, //水印倾斜度数
watermark_width: 344, //水印宽度
watermark_height: 112, //水印长度
});
});
};
onMounted(() => {
watermarkInit();
});
onBeforeUnmount(() => {
nextTick(() => {
try {
watermark.remove();
} catch (error) {}
});
});

1665367158715
image

@Yuanqiumei
Copy link
Author

已解决: watermark.init => watermark.load 手动加载

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant