Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
9
91isoft_web_vue
Project
Project
Details
Activity
Releases
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
张伯涛
91isoft_web_vue
Commits
ad0c4ea3
Commit
ad0c4ea3
authored
Mar 12, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
打包清除所有console.log(可以选择哪个环境清空哪个环境不清空)
parent
1af8c4b4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
main.js
src/main.js
+7
-0
No files found.
src/main.js
View file @
ad0c4ea3
...
@@ -59,6 +59,13 @@ Viewer.setDefaults({
...
@@ -59,6 +59,13 @@ Viewer.setDefaults({
}
}
})
})
// 打包清除所有console.log
if
(
process
.
env
.
NODE_ENV
===
'test'
)
{
if
(
window
)
{
window
.
console
.
log
=
function
()
{}
}
}
// 全局方法挂载
// 全局方法挂载
Vue
.
prototype
.
$WebView
=
WebView
Vue
.
prototype
.
$WebView
=
WebView
Vue
.
prototype
.
getDict
=
getDict
Vue
.
prototype
.
getDict
=
getDict
...
...
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