From 9aa65fb600d52b0ea355d2f2a448d788f49e369d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 9 Nov 2018 14:13:40 +0900 Subject: [PATCH] [Client] Fix bug --- src/client/app/common/views/widgets/tips.vue | 49 +++++++++++--------- 1 file changed, 26 insertions(+), 23 deletions(-) diff --git a/src/client/app/common/views/widgets/tips.vue b/src/client/app/common/views/widgets/tips.vue index 58b16f7d42..1a9c91ba8b 100644 --- a/src/client/app/common/views/widgets/tips.vue +++ b/src/client/app/common/views/widgets/tips.vue @@ -16,32 +16,35 @@ export default define({ data() { return { - tips: [ - this.$t('tips-line1'), - this.$t('tips-line2'), - this.$t('tips-line3'), - this.$t('tips-line4'), - this.$t('tips-line5'), - this.$t('tips-line6'), - this.$t('tips-line7'), - this.$t('tips-line8'), - this.$t('tips-line9'), - this.$t('tips-line10'), - this.$t('tips-line11'), - this.$t('tips-line13'), - this.$t('tips-line14'), - this.$t('tips-line17'), - this.$t('tips-line19'), - this.$t('tips-line20'), - this.$t('tips-line21'), - this.$t('tips-line23'), - this.$t('tips-line24'), - this.$t('tips-line25') - ], + tips: [], tip: null, clock: null }; }, + created() { + this.tips = [ + this.$t('tips-line1'), + this.$t('tips-line2'), + this.$t('tips-line3'), + this.$t('tips-line4'), + this.$t('tips-line5'), + this.$t('tips-line6'), + this.$t('tips-line7'), + this.$t('tips-line8'), + this.$t('tips-line9'), + this.$t('tips-line10'), + this.$t('tips-line11'), + this.$t('tips-line13'), + this.$t('tips-line14'), + this.$t('tips-line17'), + this.$t('tips-line19'), + this.$t('tips-line20'), + this.$t('tips-line21'), + this.$t('tips-line23'), + this.$t('tips-line24'), + this.$t('tips-line25') + ]; + }, mounted() { this.$nextTick(() => { this.set(); @@ -54,7 +57,7 @@ export default define({ }, methods: { set() { - this.tip = tips[Math.floor(Math.random() * tips.length)]; + this.tip = this.tips[Math.floor(Math.random() * this.tips.length)]; }, change() { anime({