|
@@ -12,16 +12,16 @@
|
|
:tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
|
|
:tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"
|
|
@change="handleTabClick"
|
|
@change="handleTabClick"
|
|
>
|
|
>
|
|
- <a-tab-pane key="tab1" tab="账号密码登录">
|
|
|
|
- <a-alert v-if="isLoginError" type="error" showIcon style="margin-bottom: 24px;" message="账户或密码错误(admin/ant.design )" />
|
|
|
|
|
|
+ <a-tab-pane key="tab1" :tab="$t('user.login.tab-login-credentials')">
|
|
|
|
+ <a-alert v-if="isLoginError" type="error" showIcon style="margin-bottom: 24px;" :message="$t('user.login.message-invalid-credentials')" />
|
|
<a-form-item>
|
|
<a-form-item>
|
|
<a-input
|
|
<a-input
|
|
size="large"
|
|
size="large"
|
|
type="text"
|
|
type="text"
|
|
- placeholder="账户: admin"
|
|
|
|
|
|
+ :placeholder="$t('user.login.username.placeholder')"
|
|
v-decorator="[
|
|
v-decorator="[
|
|
'username',
|
|
'username',
|
|
- {rules: [{ required: true, message: '请输入帐户名或邮箱地址' }, { validator: handleUsernameOrEmail }], validateTrigger: 'change'}
|
|
|
|
|
|
+ {rules: [{ required: true, message: $t('user.userName.required') }, { validator: handleUsernameOrEmail }], validateTrigger: 'change'}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
@@ -31,19 +31,19 @@
|
|
<a-form-item>
|
|
<a-form-item>
|
|
<a-input-password
|
|
<a-input-password
|
|
size="large"
|
|
size="large"
|
|
- placeholder="密码: admin or ant.design"
|
|
|
|
|
|
+ :placeholder="$t('user.login.password.placeholder')"
|
|
v-decorator="[
|
|
v-decorator="[
|
|
'password',
|
|
'password',
|
|
- {rules: [{ required: true, message: '请输入密码' }], validateTrigger: 'blur'}
|
|
|
|
|
|
+ {rules: [{ required: true, message: $t('user.password.required') }], validateTrigger: 'blur'}
|
|
]"
|
|
]"
|
|
>
|
|
>
|
|
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
<a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
</a-input-password>
|
|
</a-input-password>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-tab-pane>
|
|
</a-tab-pane>
|
|
- <a-tab-pane key="tab2" tab="手机号登录">
|
|
|
|
|
|
+ <a-tab-pane key="tab2" :tab="$t('user.login.tab-login-mobile')">
|
|
<a-form-item>
|
|
<a-form-item>
|
|
- <a-input size="large" type="text" placeholder="手机号" v-decorator="['mobile', {rules: [{ required: true, pattern: /^1[34578]\d{9}$/, message: '请输入正确的手机号' }], validateTrigger: 'change'}]">
|
|
|
|
|
|
+ <a-input size="large" type="text" :placeholder="$t('user.login.mobile.placeholder')" v-decorator="['mobile', {rules: [{ required: true, pattern: /^1[34578]\d{9}$/, message: $t('user.login.mobile.placeholder') }], validateTrigger: 'change'}]">
|
|
<a-icon slot="prefix" type="mobile" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
<a-icon slot="prefix" type="mobile" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
</a-input>
|
|
</a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -51,7 +51,7 @@
|
|
<a-row :gutter="16">
|
|
<a-row :gutter="16">
|
|
<a-col class="gutter-row" :span="16">
|
|
<a-col class="gutter-row" :span="16">
|
|
<a-form-item>
|
|
<a-form-item>
|
|
- <a-input size="large" type="text" placeholder="验证码" v-decorator="['captcha', {rules: [{ required: true, message: '请输入验证码' }], validateTrigger: 'blur'}]">
|
|
|
|
|
|
+ <a-input size="large" type="text" :placeholder="$t('user.login.mobile.verification-code.placeholder')" v-decorator="['captcha', {rules: [{ required: true, message: $t('user.verification-code.required') }], validateTrigger: 'blur'}]">
|
|
<a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
<a-icon slot="prefix" type="mail" :style="{ color: 'rgba(0,0,0,.25)' }"/>
|
|
</a-input>
|
|
</a-input>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -62,7 +62,7 @@
|
|
tabindex="-1"
|
|
tabindex="-1"
|
|
:disabled="state.smsSendBtn"
|
|
:disabled="state.smsSendBtn"
|
|
@click.stop.prevent="getCaptcha"
|
|
@click.stop.prevent="getCaptcha"
|
|
- v-text="!state.smsSendBtn && '获取验证码' || (state.time+' s')"
|
|
|
|
|
|
+ v-text="!state.smsSendBtn && $t('user.register.get-verification-code') || (state.time+' s')"
|
|
></a-button>
|
|
></a-button>
|
|
</a-col>
|
|
</a-col>
|
|
</a-row>
|
|
</a-row>
|
|
@@ -70,12 +70,12 @@
|
|
</a-tabs>
|
|
</a-tabs>
|
|
|
|
|
|
<a-form-item>
|
|
<a-form-item>
|
|
- <a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]">自动登录</a-checkbox>
|
|
|
|
|
|
+ <a-checkbox v-decorator="['rememberMe', { valuePropName: 'checked' }]">{{ $t('user.login.remember-me') }}</a-checkbox>
|
|
<router-link
|
|
<router-link
|
|
:to="{ name: 'recover', params: { user: 'aaa'} }"
|
|
:to="{ name: 'recover', params: { user: 'aaa'} }"
|
|
class="forge-password"
|
|
class="forge-password"
|
|
style="float: right;"
|
|
style="float: right;"
|
|
- >忘记密码</router-link>
|
|
|
|
|
|
+ >{{ $t('user.login.forgot-password') }}</router-link>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
<a-form-item style="margin-top:24px">
|
|
<a-form-item style="margin-top:24px">
|
|
@@ -86,11 +86,11 @@
|
|
class="login-button"
|
|
class="login-button"
|
|
:loading="state.loginBtn"
|
|
:loading="state.loginBtn"
|
|
:disabled="state.loginBtn"
|
|
:disabled="state.loginBtn"
|
|
- >确定</a-button>
|
|
|
|
|
|
+ >{{ $t('user.login.login') }}</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
|
|
|
|
<div class="user-login-other">
|
|
<div class="user-login-other">
|
|
- <span>其他登录方式</span>
|
|
|
|
|
|
+ <span>{{ $t('user.login.sign-in-with') }}</span>
|
|
<a>
|
|
<a>
|
|
<a-icon class="item-icon" type="alipay-circle"></a-icon>
|
|
<a-icon class="item-icon" type="alipay-circle"></a-icon>
|
|
</a>
|
|
</a>
|
|
@@ -100,7 +100,7 @@
|
|
<a>
|
|
<a>
|
|
<a-icon class="item-icon" type="weibo-circle"></a-icon>
|
|
<a-icon class="item-icon" type="weibo-circle"></a-icon>
|
|
</a>
|
|
</a>
|
|
- <router-link class="register" :to="{ name: 'register' }">注册账户</router-link>
|
|
|
|
|
|
+ <router-link class="register" :to="{ name: 'register' }">{{ $t('user.login.signup') }}</router-link>
|
|
</div>
|
|
</div>
|
|
</a-form>
|
|
</a-form>
|
|
|
|
|