From 7dc781f042f58be5d010472cb12226fac0311976 Mon Sep 17 00:00:00 2001 From: binaryify Date: Wed, 14 Jun 2017 16:50:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/guide/index.js | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/guide/index.js b/src/components/guide/index.js index 562fa96..a33c51a 100644 --- a/src/components/guide/index.js +++ b/src/components/guide/index.js @@ -2,25 +2,26 @@ import { transform, i18n, lan } from '../../unit/const' import { isMobile } from '../../unit' export default { name: 'Guide', - data(){ - return { - isMobile:isMobile() - } + data() { + return { + isMobile: isMobile() + } }, computed: { linkTitle: () => i18n.linkTitle[lan], github: () => i18n.github[lan], QRCode: () => i18n.QRCode[lan], QRTitle: () => i18n.QRNotice[lan], - QRSrc: () => "http://binaryify.github.io/vue-tetris/static/qr.jpeg" - + QRSrc: () => + window.location.protocol + + '//binaryify.github.io/vue-tetris/static/qr.jpeg' }, - mounted(){ + mounted() { window.addEventListener('resize', this.resize.bind(this), true) }, - methods:{ - resize(){ - this.isMobile=isMobile() + methods: { + resize() { + this.isMobile = isMobile() } } }