Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
founder_vue
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
常超
founder_vue
Commits
5465b41d
Commit
5465b41d
authored
Jan 19, 2022
by
zhangzhijie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加水印
parent
e6c684e3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
src/main.js
+6
-5
No files found.
src/main.js
View file @
5465b41d
...
@@ -44,6 +44,12 @@ Vue.prototype.$util = Util;
...
@@ -44,6 +44,12 @@ Vue.prototype.$util = Util;
window
.
util
=
Util
;
window
.
util
=
Util
;
Vue
.
use
(
VueWechatTitle
);
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"
,
{
Vue
.
directive
(
"nsLoading"
,
{
bind
(
el
,
binding
)
{
bind
(
el
,
binding
)
{
const
instance
=
new
LoadingCons
({
const
instance
=
new
LoadingCons
({
...
@@ -54,10 +60,7 @@ Vue.directive("nsLoading", {
...
@@ -54,10 +60,7 @@ Vue.directive("nsLoading", {
el
.
instance
=
instance
;
el
.
instance
=
instance
;
Vue
.
nextTick
(()
=>
{
Vue
.
nextTick
(()
=>
{
el
.
instance
.
isShow
=
binding
.
value
;
el
.
instance
.
isShow
=
binding
.
value
;
console
.
log
(
123
);
});
});
console
.
log
(
el
.
instance
);
console
.
log
(
binding
);
},
},
/**
/**
* 所在组件的 VNode 更新时调用
* 所在组件的 VNode 更新时调用
...
@@ -68,9 +71,7 @@ Vue.directive("nsLoading", {
...
@@ -68,9 +71,7 @@ Vue.directive("nsLoading", {
// 通过对比值的变化判断loading是否显示
// 通过对比值的变化判断loading是否显示
if
(
binding
.
oldValue
!==
binding
.
value
)
{
if
(
binding
.
oldValue
!==
binding
.
value
)
{
el
.
instance
.
isShow
=
binding
.
value
;
el
.
instance
.
isShow
=
binding
.
value
;
console
.
log
(
123456
);
}
}
// console.log(binding);
},
},
/**
/**
* 只调用一次,在 指令与元素解绑时调用
* 只调用一次,在 指令与元素解绑时调用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment