Răsfoiți Sursa

登录样式修改

zhangguohua 1 an în urmă
părinte
comite
a9e5f9c5fd
3 a modificat fișierele cu 43 adăugiri și 63 ștergeri
  1. 1 1
      index.html
  2. 13 4
      src/styles/login.scss
  3. 29 58
      src/views/login/login.vue

+ 1 - 1
index.html

@@ -3,7 +3,7 @@
   <head>
     <meta charset="UTF-8" />
     <link rel="icon" type="image/svg+xml" href="/favicon.ico" />
-    <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4939100_ytok8k101vf.css">
+    <link rel="stylesheet" href="//at.alicdn.com/t/c/font_4939100_i0i4t6ghfug.css">
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
     <title>慧教研后台管理系统</title>
   </head>

+ 13 - 4
src/styles/login.scss

@@ -116,14 +116,20 @@
 
       width: 100%;
       height: auto;
-      margin-bottom: 20px;
+      margin-bottom: 10px;
+      .el-form-item:last-child {
+        margin-bottom: 0;
+      }
+      .el-input__wrapper {
+        height: 48px;
+      }
       .el-input__inner
       {
         width: 100%;
         height: 48px;
         line-height: 48px;
         padding: 0;
-        text-indent: 43px;
+        text-indent: 10px;
       }
 
       .el-input__prefix
@@ -131,7 +137,7 @@
 
         display: flex;
         align-items: center;
-        left: 17px;
+        margin-left: 10px;
       }
 
       .el-input__suffix
@@ -140,6 +146,9 @@
         display: flex;
         align-items: center;
       }
+      .iconfont {
+        cursor: pointer;
+      }
     }
 
     .login_info_item
@@ -204,7 +213,7 @@
       {
         display: flex;
         justify-content: center;
-        height: 52px;
+        height: 45px;
         align-items: center;
         .line 
         {

+ 29 - 58
src/views/login/login.vue

@@ -6,75 +6,46 @@
         <span style="margin-left: 10px;">    大数据精准教学诊断平台</span>
       </div>
       <div class="header_right">
-        <div class="right_button" @click="GoWebsite"  >
-          官方网站
-        </div>
+        <div class="right_button" @click="GoWebsite"> 官方网站 </div>
       </div>
     </div>
     <div class="login_content" id="particles">
-      
       <div class="login_info">
         <div class="login_info_title">
           <p>HI~欢迎使用</p>
-          <p>大数据精准教学诊断平台
-          </p>
-        </div>
-        <div class="login_info_message">
-          后台管理系统登录
-        </div>
-        <div class="login_info_input">
-          <el-input
-              v-model="userName"
-              placeholder="请输入账号"
-            >
-              <template #prefix>
-                <span>
-                  <img
-                    src="../../assets/login/input_user.webp"
-                    alt="User Icon"
-                    style="width: 18px; height: 18px"
-                  />
-                </span>
-              </template>
-              <template #suffix v-if="userName != ''">
-                <span @click="ClearInput" style="cursor: pointer">
-                  <img
-                    src="../../assets/login/input_clear.webp"
-                    alt="Clear Icon"
-                    style="width: 18px; height: 18px"
-                  />
-                </span>
-              </template>
-            </el-input>
+          <p>大数据精准教学诊断平台</p>
         </div>
+        <div class="login_info_message">后台管理系统登录</div>
         <div class="login_info_input">
-          <el-input
-              v-model="passWord"
-              show-password
-              placeholder="请输入密码"
-            
-            >
-              <template #prefix>
-                <span>
-                  <img
-                    src="../../assets/login/input_pass.webp"
-                    alt="User Icon"
-                    style="width: 18px; height: 18px"
-                  />
-                </span>
-              </template>
-              <template #suffix>
-                <i
-                  class="iconfont icon-ttubiao_hide"
-                  
-                ></i>
-              </template>
-            </el-input>
+          <el-form :model="userInfo" :rules="rules" ref="userInfoForm">
+            <el-form-item prop="userName">
+              <el-input v-model="userName" placeholder="请输入账号" clearable>
+                <template #prefix>
+                  <i class="iconfont icon_zhanghao" />
+                </template>
+              </el-input>
+            </el-form-item>
+            <el-form-item prop="passWord">
+              <el-input v-model="passWord" type="password" show-password placeholder="请输入密码">
+                <template #prefix>
+                  <i class="iconfont icon_mima" />
+                </template>
+              </el-input>
+              <!-- <el-input v-model="passWord" placeholder="请输入密码" :type="!showPass ? 'password' : 'text'">
+                <template #prefix>
+                  <i class="iconfont icon_mima" />
+                </template>
+                <template #suffix>
+                  <i v-if="passWord" class="iconfont" :class="showPass ? 'icon_xianshimima' : 'icon_buxianshimima'" 
+                    @click.stop="showPass = !showPass"></i>
+                </template>
+              </el-input> -->
+            </el-form-item>
+          </el-form>
         </div>
         <div class="login_info_item">
           <div class="item_left">
             <el-checkbox v-model="remeberPassWord">记住密码</el-checkbox>
-
           </div>
           <div class="item_right">忘记密码</div>
         </div>
@@ -121,7 +92,7 @@ const userName = ref('')
 const passWord = ref('')
 const remeberPassWord = ref(false)
 const loadingLogin = ref(false)
-
+// const showPass = ref(false)
 // 粒子动画初始化
 const InitParticles = () => {
   const particlesConfig = {