Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-webapp-cli
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
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
heasy
hls-webapp-cli
Commits
ab408239
Commit
ab408239
authored
Aug 28, 2020
by
JingChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
master
parent
7379c31d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
meta.js
meta.js
+1
-1
App.vue
template/src/App.vue
+22
-0
index.js
utils/index.js
+2
-2
No files found.
meta.js
View file @
ab408239
...
@@ -18,7 +18,7 @@ module.exports = {
...
@@ -18,7 +18,7 @@ module.exports = {
},
},
description
:
{
description
:
{
type
:
'string'
,
type
:
'string'
,
required
:
fals
e
,
required
:
tru
e
,
message
:
'Project description'
,
message
:
'Project description'
,
default
:
'A Vue.js project'
,
default
:
'A Vue.js project'
,
},
},
...
...
template/src/App.vue
View file @
ab408239
...
@@ -48,8 +48,30 @@ export default {
...
@@ -48,8 +48,30 @@ export default {
},
},
mounted
()
{
mounted
()
{
// this.getAccessToken()
// this.getAccessToken()
this
.
keyboardHide
()
},
},
methods
:
{
methods
:
{
keyboardHide
()
{
let
myFunction
let
isWXAndIos
=
this
.
isWeiXinAndIos
()
if
(
isWXAndIos
)
{
document
.
body
.
addEventListener
(
'focusin'
,
()
=>
{
clearTimeout
(
myFunction
)
})
document
.
body
.
addEventListener
(
'focusout'
,
()
=>
{
clearTimeout
(
myFunction
)
myFunction
=
setTimeout
(()
=>
{
window
.
scrollTo
({
top
:
0
,
left
:
0
,
behavior
:
'smooth'
})
},
200
)
})
}
},
isWeiXinAndIos
()
{
let
ua
=
''
+
window
.
navigator
.
userAgent
.
toLowerCase
()
let
isWeixin
=
/MicroMessenger/i
.
test
(
ua
)
let
isIos
=
/
\(
i
[^
;
]
+;
(
U;
)?
CPU.+Mac OS X/i
.
test
(
ua
)
return
isWeixin
&&
isIos
},
getAccessToken
()
{
getAccessToken
()
{
let
vm
=
this
let
vm
=
this
let
url
=
process
.
env
.
loginPath
+
'appadmin'
let
url
=
process
.
env
.
loginPath
+
'appadmin'
...
...
utils/index.js
View file @
ab408239
...
@@ -27,7 +27,7 @@ exports.sortDependencies = function sortDependencies(data) {
...
@@ -27,7 +27,7 @@ exports.sortDependencies = function sortDependencies(data) {
*/
*/
exports
.
installDependencies
=
function
installDependencies
(
exports
.
installDependencies
=
function
installDependencies
(
cwd
,
cwd
,
executable
=
'
npm
'
,
executable
=
'
yarn
'
,
color
color
)
{
)
{
console
.
log
(
`\n\n#
${
color
(
'Installing project dependencies ...'
)}
`
)
console
.
log
(
`\n\n#
${
color
(
'Installing project dependencies ...'
)}
`
)
...
@@ -75,7 +75,7 @@ To get started:
...
@@ -75,7 +75,7 @@ To get started:
${
yellow
(
${
yellow
(
`
${
data
.
inPlace
?
''
:
`cd
${
data
.
destDirName
}
\n `
}${
installMsg
(
`
${
data
.
inPlace
?
''
:
`cd
${
data
.
destDirName
}
\n `
}${
installMsg
(
data
data
)}${
lintMsg
(
data
)}
npm run dev
`
)}${
lintMsg
(
data
)}
yarn start
`
)}
)}
Documentation can be found at https://vuejs-templates.github.io/webpack
Documentation can be found at https://vuejs-templates.github.io/webpack
...
...
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