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
a0f96826
Commit
a0f96826
authored
Nov 19, 2020
by
lipengcheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: yarnrc
]
parent
bc3da0cf
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
32 additions
and
19 deletions
+32
-19
.eslintrc.js
.eslintrc.js
+11
-11
.prettierrc.js
.prettierrc.js
+1
-1
.yarnrc
.yarnrc
+1
-0
package.json
package.json
+1
-1
index.js
src/directives/index.js
+3
-1
index.js
src/plugins/axios/index.js
+3
-1
registerServiceWorker.js
src/registerServiceWorker.js
+4
-1
index.js
src/utils/index.js
+7
-2
home.vue
src/views/home.vue
+1
-1
No files found.
.eslintrc.js
View file @
a0f96826
...
...
@@ -54,17 +54,6 @@ module.exports = {
'comma-dangle'
:
[
'error'
,
'never'
],
quotes
:
[
'error'
,
'single'
],
semi
:
[
'error'
,
'never'
],
'vue/html-indent'
:
[
'error'
,
4
,
{
attribute
:
1
,
baseIndent
:
1
,
closeBracket
:
0
,
alignAttributesVertically
:
true
,
ignores
:
[]
}
],
'vue/html-self-closing'
:
[
'error'
,
{
...
...
@@ -84,6 +73,17 @@ module.exports = {
multiline
:
'never'
}
],
'vue/html-indent'
:
[
'error'
,
4
,
{
attribute
:
1
,
baseIndent
:
1
,
closeBracket
:
0
,
alignAttributesVertically
:
true
,
ignores
:
[]
}
],
// 去掉空白报错
'no-irregular-whitespace'
:
'off'
,
// 变量声明后必须使用;参数arg不做限制
...
...
.prettierrc.js
View file @
a0f96826
...
...
@@ -17,7 +17,7 @@ module.exports = {
// true: { foo: bar }
// false: {foo: bar}
bracketSpacing
:
true
,
// JSX标签闭合位置 >是否
单独放
一行 默认false
// JSX标签闭合位置 >是否
在同
一行 默认false
// false: <div
// className=""
// style={{}}
...
...
.yarnrc
0 → 100644
View file @
a0f96826
registry "https://registry.npm.taobao.org"
package.json
View file @
a0f96826
...
...
@@ -11,8 +11,8 @@
"start"
:
"serve -l 3020 dist"
,
"lint"
:
"vue-cli-service lint"
,
"inspect"
:
"vue-cli-service inspect > webpack.js"
,
"prettier"
:
"prettier --write
\"
src/**/*.js
\"
\"
src/**/*.vue
\"
\"
./*.js
\"
"
,
"fix"
:
"eslint --fix --ext .js,.vue src"
,
"prettier"
:
"prettier --write
\"
src/**/*.js
\"
\"
src/**/*.vue
\"
./*.js"
,
"commit"
:
"git cz"
,
"release:init"
:
"standard-version --first-release "
,
"release:patch"
:
"standard-version --release-as patch "
,
...
...
src/directives/index.js
View file @
a0f96826
...
...
@@ -41,7 +41,9 @@ export default {
}
},
unbind
:
(
el
,
binding
)
=>
{
window
.
IntersectionObserver
?
binding
.
def
.
observer
.
unobserve
(
el
)
:
window
.
removeEventListener
(
'scroll'
,
binding
.
def
.
scrollHandler
)
window
.
IntersectionObserver
?
binding
.
def
.
observer
.
unobserve
(
el
)
:
window
.
removeEventListener
(
'scroll'
,
binding
.
def
.
scrollHandler
)
},
observer
:
{},
scrollHandler
(
el
,
binding
)
{
...
...
src/plugins/axios/index.js
View file @
a0f96826
...
...
@@ -35,7 +35,9 @@ const requestInterceptorId = request.interceptors.request.use(
// 在发送请求之前做些什么
// config.headers.common['cookie-id'] = cookieId
config
.
cancelToken
=
new
axios
.
CancelToken
((
cancelFn
)
=>
{
pendingPool
.
has
(
config
.
url
)
?
cancelFn
(
`
${
config
.
url
}
请求重复`
)
:
pendingPool
.
set
(
config
.
url
,
{
cancelFn
,
global
:
config
.
global
})
pendingPool
.
has
(
config
.
url
)
?
cancelFn
(
`
${
config
.
url
}
请求重复`
)
:
pendingPool
.
set
(
config
.
url
,
{
cancelFn
,
global
:
config
.
global
})
})
return
config
},
...
...
src/registerServiceWorker.js
View file @
a0f96826
...
...
@@ -5,7 +5,10 @@ import { register } from 'register-service-worker'
if
(
process
.
env
.
NODE_ENV
===
'production'
)
{
register
(
`
${
process
.
env
.
BASE_URL
}
service-worker.js`
,
{
ready
()
{
console
.
log
(
'App is being served from cache by a service worker.
\
n'
+
'For more details, visit https://goo.gl/AFskqB'
)
console
.
log
(
'App is being served from cache by a service worker.
\
n'
+
'For more details, visit https://goo.gl/AFskqB'
)
},
registered
()
{
console
.
log
(
'Service worker has been registered.'
)
...
...
src/utils/index.js
View file @
a0f96826
...
...
@@ -184,7 +184,10 @@ const util = {
}
for
(
var
k
in
date
)
{
if
(
new
RegExp
(
'('
+
k
+
')'
).
test
(
format
))
{
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
date
[
k
]
:
(
'00'
+
date
[
k
]).
substr
((
''
+
date
[
k
]).
length
))
format
=
format
.
replace
(
RegExp
.
$1
,
RegExp
.
$1
.
length
==
1
?
date
[
k
]
:
(
'00'
+
date
[
k
]).
substr
((
''
+
date
[
k
]).
length
)
)
}
}
return
format
...
...
@@ -242,7 +245,9 @@ const util = {
qq
:
ua
.
match
(
/
\s
QQ/i
)
!==
null
,
//是否QQ
Safari
:
ua
.
indexOf
(
'Safari'
)
>
-
1
,
//Safari浏览器,
weibo
:
ua
.
indexOf
(
'Weibo'
)
>
-
1
,
//是否微博
isMobile
:
/
(
iPhone|iPod|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone|micromessenger|
)
/gi
.
test
(
ua
),
isMobile
:
/
(
iPhone|iPod|Opera Mini|Android.*Mobile|NetFront|PSP|BlackBerry|Windows Phone|micromessenger|
)
/gi
.
test
(
ua
),
isEdge
:
ua
.
includes
(
'Edge'
),
isFF
:
ua
.
includes
(
'Firefox'
),
isBB
:
ua
.
includes
(
'BlackBerry'
),
...
...
src/views/home.vue
View file @
a0f96826
...
...
@@ -7,7 +7,7 @@
a=
"dfsfsdfdsfsdffsdfsdfsdfsdfsfsdf"
b=
"dfsfsdfdsfsfsdfsdfsdfsdfsfsdf"
c=
"dfsfsdfdsfsfsddfsddfsdfsdfsfsdf"
d=
"dfsfsdfdsf
sfsddfsddfsd
fsdfsfsdf"
>
d=
"dfsfsdfdsffsdfsfsdf"
>
df
</div>
<g-button></g-button>
...
...
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