fix: 修改语言切换

This commit is contained in:
MTrun
2021-12-22 15:31:20 +08:00
parent 5cfdcc68b7
commit 5cbdbf137d
16 changed files with 151 additions and 140 deletions
@@ -2,6 +2,7 @@
<n-loading-bar-provider>
<n-dialog-provider>
<DialogContent />
<LoadingContent />
<n-notification-provider>
<n-message-provider>
<MessageContent />
@@ -22,4 +23,5 @@ import {
import { MessageContent } from '@/components/MessageContent'
import { DialogContent } from '@/components/DialogContent'
import { LoadingContent } from '@/components/LoadingContent'
</script>
+3
View File
@@ -0,0 +1,3 @@
import LoadingContent from './index.vue';
export { LoadingContent };
+12
View File
@@ -0,0 +1,12 @@
<script lang="ts">
import { useLoadingBar } from 'naive-ui'
export default {
name: 'LoadingContent',
setup() {
// 挂载在 window 方便与在js中使用
window['$loading'] = useLoadingBar()
window['$loading'].finish()
}
}
</script>
+1 -2
View File
@@ -24,12 +24,11 @@ import { h, ref, reactive } from 'vue';
import { NAvatar, NText } from 'naive-ui'
import { renderIcon } from '@/utils'
import { openDoc, logout } from '@/utils'
import { useI18n } from 'vue-i18n'
import { icon } from '@/plugins'
const { DocumentTextIcon, ChatboxEllipsesIcon, PersonIcon, LogOutOutlineIcon } = icon.ionicons5
const { t } = useI18n()
const t = window['$t']
const imageUrl = 'https://www.naiveui.com/assets/naivelogo.93278402.svg'