Skip to content

Commit

Permalink
perf[Login Form]: optimize eye icon style (PanJiaChen#1545)
Browse files Browse the repository at this point in the history
* optimiz: eye icon style for login form

* change eye-open svg
  • Loading branch information
yugasun authored and PanJiaChen committed Jan 23, 2019
1 parent ac8eddf commit 8cf279f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
1 change: 1 addition & 0 deletions src/icons/svg/eye-open.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 17 additions & 11 deletions src/views/login/index.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="login-container">

<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">

<div class="title-container">
<h3 class="title">{{ $t('login.title') }}</h3>
<lang-select class="set-language"/>
<h3 class="title">
{{ $t('login.title') }}
</h3>
<lang-select class="set-language" />
</div>

<el-form-item prop="username">
Expand All @@ -26,30 +26,37 @@
<svg-icon icon-class="password" />
</span>
<el-input
:type="passwordType"
v-model="loginForm.password"
:type="passwordType"
:placeholder="$t('login.password')"
name="password"
auto-complete="on"
@keyup.enter.native="handleLogin" />
@keyup.enter.native="handleLogin"
/>
<span class="show-pwd" @click="showPwd">
<svg-icon icon-class="eye" />
<svg-icon :icon-class="passwordType === 'password' ? 'eye' : 'eye-open'" />
</span>
</el-form-item>

<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">{{ $t('login.logIn') }}</el-button>
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">
{{ $t('login.logIn') }}
</el-button>

<div style="position:relative">
<div class="tips">
<span>{{ $t('login.username') }} : admin</span>
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
</div>
<div class="tips">
<span style="margin-right:18px;">{{ $t('login.username') }} : editor</span>
<span style="margin-right:18px;">
{{ $t('login.username') }} : editor
</span>
<span>{{ $t('login.password') }} : {{ $t('login.any') }}</span>
</div>

<el-button class="thirdparty-button" type="primary" @click="showDialog=true">{{ $t('login.thirdparty') }}</el-button>
<el-button class="thirdparty-button" type="primary" @click="showDialog=true">
{{ $t('login.thirdparty') }}
</el-button>
</div>
</el-form>

Expand All @@ -60,7 +67,6 @@
<br>
<social-sign />
</el-dialog>

</div>
</template>

Expand Down

0 comments on commit 8cf279f

Please sign in to comment.