From 88c470278fac00b3e10cd3e409a73ec19ec55585 Mon Sep 17 00:00:00 2001 From: Hawtim Zhang Date: Tue, 20 Oct 2020 08:56:25 +0800 Subject: [PATCH] feat: player component i18n support (#25) * feat: add config to resolve path alias. * feat: use vue-i18n for language switch * feat: add .editorconfig for ide * fix: add no-referrer to avoid CROB * fix: setCookie and fix typo * feat: integrate vue-i18n * feat: player component i18n support --- src/components/ContextMenu.vue | 6 +++--- src/components/Player.vue | 16 ++++++++-------- src/locale/messages.js | 22 ++++++++++++++++++++++ 3 files changed, 33 insertions(+), 11 deletions(-) diff --git a/src/components/ContextMenu.vue b/src/components/ContextMenu.vue index 1c1b9e2..00e84bd 100644 --- a/src/components/ContextMenu.vue +++ b/src/components/ContextMenu.vue @@ -25,7 +25,7 @@ export default { }; }, methods: { - setMenu: function(top, left) { + setMenu(top, left) { let largestHeight = window.innerHeight - this.$refs.menu.offsetHeight - 25; let largestWidth = window.innerWidth - this.$refs.menu.offsetWidth - 25; @@ -35,11 +35,11 @@ export default { this.left = left + "px"; }, - closeMenu: function() { + closeMenu() { this.showMenu = false; }, - openMenu: function(e) { + openMenu(e) { this.showMenu = true; this.$nextTick( function() { diff --git a/src/components/Player.vue b/src/components/Player.vue index f697333..12a9bc5 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -37,7 +37,7 @@
- +
- -
@@ -82,11 +82,11 @@
- +