mirror of
https://github.com/GiriNeko/YesPlayMusic.git
synced 2025-12-16 21:28:06 +00:00
feat: add settings page & move change lang button to settings page
This commit is contained in:
parent
d5ef383999
commit
23d25433fa
8 changed files with 241 additions and 51 deletions
|
|
@ -41,9 +41,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="locale-changer" @click="changeLang">
|
||||
<svg-icon icon-class="translation" class="translation" />
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
</template>
|
||||
|
|
@ -80,16 +77,6 @@ export default {
|
|||
query: { keywords: this.keywords },
|
||||
});
|
||||
},
|
||||
changeLang() {
|
||||
let lang = "";
|
||||
if (this.$i18n.locale === "zh-CN") {
|
||||
lang = "en";
|
||||
} else {
|
||||
lang = "zh-CN";
|
||||
}
|
||||
this.$i18n.locale = lang;
|
||||
this.$store.commit("changeLang", lang);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -213,13 +200,4 @@ nav {
|
|||
width: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.locale-changer {
|
||||
position: relative;
|
||||
.translation {
|
||||
margin-left: 16px;
|
||||
height: 48px;
|
||||
width: 48px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue