开发喵星球

若依分离版实现添加水印功能(五十九)

1、在package.json文件dependencies节点增加依赖

"watermark-dom": "2.3.0"

2、在AppMain.vue文件引入水印模块

import watermark from "watermark-dom";

export default {
  name: "AppMain",
  mounted() {
    // 加载水印
    const username = this.$store.state.user.name;
    watermark.load({ watermark_txt: username + "水印" });
  },
  computed: {
    .....
  }
};
   
分类:Java/OOP 作者:无限繁荣, 吴蓉 发表于:2023-12-04 19:05:28 阅读量:162
<<   >>


powered by kaifamiao