refactor(lang): 优化多语言翻译函数,支持传入默认值
修改lang.js的翻译方法,支持传入默认值参数,当找不到对应翻译时使用传入的默认值;同时更新member-public.js中的调用方式,简化多语言调用代码
This commit is contained in:
@@ -12,8 +12,8 @@ export default {
|
||||
// 退出登录
|
||||
logout() {
|
||||
uni.showModal({
|
||||
title: this.$lang ? this.$lang('logoutTitle') : '提示',
|
||||
content: this.$lang ? this.$lang('logoutContent') : '确定要退出登录吗',
|
||||
title: this.$lang('logoutTitle', '提示'),
|
||||
content: this.$lang('logoutContent', '确定要退出登录吗'),
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.clearLoginState();
|
||||
|
||||
Reference in New Issue
Block a user