Commit ab408239 authored by JingChao's avatar JingChao

master

parent 7379c31d
......@@ -18,7 +18,7 @@ module.exports = {
},
description: {
type: 'string',
required: false,
required: true,
message: 'Project description',
default: 'A Vue.js project',
},
......
......@@ -48,8 +48,30 @@ export default {
},
mounted () {
// this.getAccessToken()
this.keyboardHide()
},
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 () {
let vm = this
let url = process.env.loginPath + 'appadmin'
......
......@@ -27,7 +27,7 @@ exports.sortDependencies = function sortDependencies(data) {
*/
exports.installDependencies = function installDependencies(
cwd,
executable = 'npm',
executable = 'yarn',
color
) {
console.log(`\n\n# ${color('Installing project dependencies ...')}`)
......@@ -75,7 +75,7 @@ To get started:
${yellow(
`${data.inPlace ? '' : `cd ${data.destDirName}\n `}${installMsg(
data
)}${lintMsg(data)}npm run dev`
)}${lintMsg(data)}yarn start`
)}
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