Commit ab408239 authored by JingChao's avatar JingChao

master

parent 7379c31d
...@@ -18,7 +18,7 @@ module.exports = { ...@@ -18,7 +18,7 @@ module.exports = {
}, },
description: { description: {
type: 'string', type: 'string',
required: false, required: true,
message: 'Project description', message: 'Project description',
default: 'A Vue.js project', default: 'A Vue.js project',
}, },
......
...@@ -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'
......
...@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment