mirror of
https://gitee.com/dromara/go-view.git
synced 2025-02-24 00:02:51 +08:00
fix: 修改语言切换不会同步的问题
This commit is contained in:
parent
05ed82b091
commit
1b878b0016
@ -54,7 +54,7 @@ const langStore = useLangStore()
|
||||
const list = reactive<ListType[]>([
|
||||
{
|
||||
key: 'lang',
|
||||
value: false,
|
||||
value: langStore.getReload,
|
||||
type: 'switch',
|
||||
name: '切换语言',
|
||||
desc: '切换语言是否重新加载页面',
|
||||
|
@ -19,11 +19,11 @@
|
||||
</n-dropdown>
|
||||
|
||||
<!-- 系统设置 model -->
|
||||
<SystemSet v-model:modelShow="modelShow"/>
|
||||
<SystemSet v-model:modelShow="modelShow" />
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { h, ref, reactive } from 'vue'
|
||||
import { h, ref, watchEffect } from 'vue'
|
||||
import { NAvatar, NText } from 'naive-ui'
|
||||
import { renderIcon } from '@/utils'
|
||||
import { openDoc, logout } from '@/utils'
|
||||
@ -68,8 +68,9 @@ const renderUserInfo = () => {
|
||||
]
|
||||
)
|
||||
}
|
||||
const options = ref()
|
||||
|
||||
const options = reactive([
|
||||
const init = (doc: string, contact: string, sysSet: string, logout: string) => [
|
||||
{
|
||||
label: '我的信息',
|
||||
key: 'info',
|
||||
@ -81,17 +82,17 @@ const options = reactive([
|
||||
key: 'd1'
|
||||
},
|
||||
{
|
||||
label: t('global.doc'),
|
||||
label: doc,
|
||||
key: 'doc',
|
||||
icon: renderIcon(DocumentTextIcon)
|
||||
},
|
||||
{
|
||||
label: t('global.contact'),
|
||||
label: contact,
|
||||
key: 'contact',
|
||||
icon: renderIcon(ChatboxEllipsesIcon)
|
||||
},
|
||||
{
|
||||
label: t('global.sys_set'),
|
||||
label: sysSet,
|
||||
key: 'sysSet',
|
||||
icon: renderIcon(SettingsSharpIcon)
|
||||
},
|
||||
@ -100,11 +101,20 @@ const options = reactive([
|
||||
key: 'd3'
|
||||
},
|
||||
{
|
||||
label: t('global.logout'),
|
||||
label: logout,
|
||||
key: 'logout',
|
||||
icon: renderIcon(LogOutOutlineIcon)
|
||||
}
|
||||
])
|
||||
]
|
||||
|
||||
watchEffect(() => {
|
||||
options.value = init(
|
||||
t('global.doc'),
|
||||
t('global.contact'),
|
||||
t('global.sys_set'),
|
||||
t('global.logout')
|
||||
)
|
||||
})
|
||||
|
||||
// 图片渲染错误
|
||||
const errorHandle = (e: Event) => {
|
||||
|
Loading…
Reference in New Issue
Block a user