Commit 5465b41d by zhangzhijie

添加水印

parent e6c684e3
......@@ -44,6 +44,12 @@ Vue.prototype.$util = Util;
window.util = Util;
Vue.use(VueWechatTitle);
let userInfo = window.sessionStorage.getItem("userInfo") || "";
if (userInfo) {
userInfo = JSON.parse(window.sessionStorage.getItem("userInfo"))
Watermark.set(userInfo.realname, userInfo.userName, userInfo.identitycard, userInfo.ip)
}
Vue.directive("nsLoading", {
bind(el, binding) {
const instance = new LoadingCons({
......@@ -54,10 +60,7 @@ Vue.directive("nsLoading", {
el.instance = instance;
Vue.nextTick(() => {
el.instance.isShow = binding.value;
console.log(123);
});
console.log(el.instance);
console.log(binding);
},
/**
* 所在组件的 VNode 更新时调用
......@@ -68,9 +71,7 @@ Vue.directive("nsLoading", {
// 通过对比值的变化判断loading是否显示
if (binding.oldValue !== binding.value) {
el.instance.isShow = binding.value;
console.log(123456);
}
// console.log(binding);
},
/**
* 只调用一次,在 指令与元素解绑时调用
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment