优化系统配置
This commit is contained in:
parent
0484b9c487
commit
1f5ce7d039
13
src/App.vue
13
src/App.vue
@ -10,7 +10,7 @@ import { ElConfigProvider } from 'element-plus'
|
|||||||
import zh from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
|
import zh from 'element-plus/lib/locale/lang/zh-cn' // 中文语言
|
||||||
import en from 'element-plus/lib/locale/lang/en' // 英文语言
|
import en from 'element-plus/lib/locale/lang/en' // 英文语言
|
||||||
import tw from 'element-plus/lib/locale/lang/zh-tw' //繁体
|
import tw from 'element-plus/lib/locale/lang/zh-tw' //繁体
|
||||||
|
import defaultSettings from '@/settings'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const token = computed(() => {
|
const token = computed(() => {
|
||||||
@ -21,7 +21,8 @@ const lang = computed(() => {
|
|||||||
return useAppStore().lang
|
return useAppStore().lang
|
||||||
})
|
})
|
||||||
const locale = ref(zh)
|
const locale = ref(zh)
|
||||||
const size = ref('small')
|
const size = ref(defaultSettings.defaultSize)
|
||||||
|
|
||||||
size.value = useAppStore().size
|
size.value = useAppStore().size
|
||||||
watch(
|
watch(
|
||||||
token,
|
token,
|
||||||
@ -32,8 +33,8 @@ watch(
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true,
|
||||||
deep: true,
|
deep: true
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
watch(
|
watch(
|
||||||
lang,
|
lang,
|
||||||
@ -49,7 +50,7 @@ watch(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
immediate: true,
|
immediate: true
|
||||||
},
|
}
|
||||||
)
|
)
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -71,5 +71,9 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 是否显示其他登录
|
* 是否显示其他登录
|
||||||
*/
|
*/
|
||||||
showOtherLogin: false
|
showOtherLogin: false,
|
||||||
|
/**
|
||||||
|
* 默认大小
|
||||||
|
*/
|
||||||
|
defaultSize: 'default'
|
||||||
}
|
}
|
||||||
|
|||||||
@ -104,9 +104,9 @@ const captchaOnOff = ref('')
|
|||||||
const register = ref(false)
|
const register = ref(false)
|
||||||
const redirect = ref()
|
const redirect = ref()
|
||||||
redirect.value = route.query.redirect
|
redirect.value = route.query.redirect
|
||||||
proxy.getConfigKey('sys.account.captchaOnOff').then((response) => {
|
// proxy.getConfigKey('sys.account.captchaOnOff').then((response) => {
|
||||||
captchaOnOff.value = response.data
|
// captchaOnOff.value = response.data
|
||||||
})
|
// })
|
||||||
|
|
||||||
function handleLogin() {
|
function handleLogin() {
|
||||||
proxy.$refs.loginRef.validate((valid) => {
|
proxy.$refs.loginRef.validate((valid) => {
|
||||||
@ -147,6 +147,7 @@ function getCode() {
|
|||||||
getCodeImg().then((res) => {
|
getCodeImg().then((res) => {
|
||||||
codeUrl.value = 'data:image/gif;base64,' + res.data.img
|
codeUrl.value = 'data:image/gif;base64,' + res.data.img
|
||||||
loginForm.value.uuid = res.data.uuid
|
loginForm.value.uuid = res.data.uuid
|
||||||
|
captchaOnOff.value = res.data.captchaOff
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user