修复切换语言,登录页谷歌登录和微信登录按钮添加语言适配
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<!-- <div class="icon" @click="toGmailLogin"> -->
|
||||
<div class="icon">
|
||||
<img src="@/assets/images/loginPage/gmailIcon.svg" alt="">
|
||||
<span>{{ $props.text }}</span>
|
||||
<span>{{ displayText }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -21,7 +21,7 @@
|
||||
props: {
|
||||
text: {
|
||||
type: String,
|
||||
default: 'Sign in with Google'
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
setup(props, { emit }) {
|
||||
@@ -108,6 +108,9 @@
|
||||
const toGmailLogin = ()=>{
|
||||
message.info(t('account.canNotUtilize'))
|
||||
}
|
||||
const displayText = computed(() => {
|
||||
return props.text || t('Login.LoginWithGoogle')
|
||||
})
|
||||
onBeforeUnmount(()=>{
|
||||
var existingScript = document.querySelector(`script[src="${data.scriptSrc}"]`);
|
||||
if(existingScript){
|
||||
@@ -120,6 +123,7 @@
|
||||
})
|
||||
return {
|
||||
toGmailLogin,
|
||||
displayText,
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user