code refactor

This commit is contained in:
MaysWind
2024-08-03 18:21:04 +08:00
parent 77439f675b
commit f1f61a9038
10 changed files with 28 additions and 28 deletions
+3 -3
View File
@@ -123,8 +123,8 @@
:title="currentLanguageName"
smart-select :smart-select-params="{ openIn: 'popup', popupPush: true, closeOnSelect: true, scrollToSelectedItem: true, searchbar: true, searchbarPlaceholder: $t('Language'), searchbarDisableText: $t('Cancel'), appendSearchbarNotFound: $t('No results'), pageTitle: $t('Language'), popupCloseLinkText: $t('Done') }">
<select v-model="newProfile.language">
<option :value="language.code"
:key="language.code"
<option :value="language.languageTag"
:key="language.languageTag"
v-for="language in allLanguages">{{ language.displayName }}</option>
</select>
</f7-list-item>
@@ -440,7 +440,7 @@ export default {
},
currentLanguageName() {
for (let i = 0; i < this.allLanguages.length; i++) {
if (this.allLanguages[i].code === this.newProfile.language) {
if (this.allLanguages[i].languageTag === this.newProfile.language) {
return this.allLanguages[i].displayName;
}
}