Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mould-vuecli3
Project
Project
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
lhfe
mould-vuecli3
Commits
96738d8f
Commit
96738d8f
authored
Aug 30, 2020
by
lipengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
引入uitls
parent
0be858bb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
729 additions
and
1 deletion
+729
-1
.eslintrc.js
.eslintrc.js
+6
-1
main.js
src/main.js
+2
-0
index.js
src/utils/index.js
+721
-0
No files found.
.eslintrc.js
View file @
96738d8f
...
@@ -23,6 +23,9 @@ module.exports = {
...
@@ -23,6 +23,9 @@ module.exports = {
* "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
* "warn" 或 1 - 开启规则,使用警告级别的错误:warn (不会导致程序退出)
* "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
* "error" 或 2 - 开启规则,使用错误级别的错误:error (当被触发的时候,程序会退出)
*/
*/
globals
:
{
window
:
true
},
rules
:
{
rules
:
{
// 会报各种奇怪的错误 如:error: Delete ⏎ (prettier/prettier) at src/pages/xxx 等;
// 会报各种奇怪的错误 如:error: Delete ⏎ (prettier/prettier) at src/pages/xxx 等;
// 这是因为prettier配置和编辑器prettier配置冲突导致的 在下面配置覆盖掉就可以了
// 这是因为prettier配置和编辑器prettier配置冲突导致的 在下面配置覆盖掉就可以了
...
@@ -80,6 +83,8 @@ module.exports = {
...
@@ -80,6 +83,8 @@ module.exports = {
singleline
:
'never'
,
singleline
:
'never'
,
multiline
:
'never'
multiline
:
'never'
}
}
]
],
// 去掉空白报错
'no-irregular-whitespace'
:
'off'
}
}
}
}
src/main.js
View file @
96738d8f
...
@@ -12,6 +12,7 @@ import layoutComponents from '@/components/layout/index.js'
...
@@ -12,6 +12,7 @@ import layoutComponents from '@/components/layout/index.js'
import
globalComponents
from
'@/components/global/index.js'
import
globalComponents
from
'@/components/global/index.js'
import
filters
from
'@/filters/index.js'
import
filters
from
'@/filters/index.js'
import
directives
from
'@/directives/index.js'
import
directives
from
'@/directives/index.js'
import
utils
from
'@/utils/index.js'
// 全局注册layout组件
// 全局注册layout组件
Vue
.
use
(
layoutComponents
)
Vue
.
use
(
layoutComponents
)
// 注册自定义全局组件
// 注册自定义全局组件
...
@@ -29,6 +30,7 @@ console.log('baseURL:', baseURL)
...
@@ -29,6 +30,7 @@ console.log('baseURL:', baseURL)
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
Vue
.
prototype
.
$http
=
axios
Vue
.
prototype
.
$http
=
axios
Vue
.
prototype
.
$mt
=
moment
Vue
.
prototype
.
$mt
=
moment
Vue
.
prototype
.
$
=
utils
new
Vue
({
new
Vue
({
router
,
router
,
...
...
src/utils/index.js
0 → 100644
View file @
96738d8f
This diff is collapsed.
Click to expand it.
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