gpc-ui 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gpc-ui",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "二小UI",
5
5
  "private": false,
6
6
  "main": "lib/gpc-ui.umd.min.js",
@@ -4,7 +4,7 @@
4
4
  <div style="color: #018a46; font-size: 40px; font-style: unset; text-align: right;">
5
5
  {{systemTitle}}
6
6
  </div>
7
- <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">●{{subtitle}}</div>
7
+ <div style="color: #018a46; font-size: 32px; font-style: unset; text-align: right;">·{{subtitle}}</div>
8
8
  </div>
9
9
  <div class="wrap-box">
10
10
  <div class="box-content">
@@ -28,15 +28,15 @@
28
28
  <input type="text" placeholder="用户名/手机号" v-model="accountFrom.username">
29
29
  </div>
30
30
  <div class="input-box">
31
- <input type="password" placeholder="密码" v-model="accountFrom.password">
32
- <i class="el-icon-edit"></i>
31
+ <input :type="inputType" placeholder="密码" v-model="accountFrom.password">
32
+ <i class="el-icon-view" :class="{ icon: Color }" @click="Show" ></i>
33
33
  </div>
34
34
  <drag-verify ref="dragVerifyLogin" :width="300" :isPassing.sync="isPassingAccount" text="请按住滑块拖动" successText="验证通过" progressBarBg="#11C36A"
35
35
  handlerIcon="el-icon-d-arrow-right" successIcon="el-icon-circle-check"
36
36
  @passcallback="passCallAccountBack">
37
37
  </drag-verify>
38
38
  <div class="buttons clearfix">
39
- <button type="button" class="btn-login fr button" @click="getAccountLogin">登录</button>
39
+ <el-button class="btn-login fr button" :loading="loading" @click="getAccountLogin">登录</el-button>
40
40
  <el-button type="text" style="color: #028037;" size="small" @click="getRegister">重置密码</el-button>
41
41
  </div>
42
42
  </div>
@@ -144,10 +144,16 @@ export default {
144
144
  type: String,
145
145
  default: ''
146
146
  },
147
+ loading: {
148
+ type: Boolean,
149
+ default: false
150
+ }
147
151
  },
148
152
  data() {
149
153
  return {
150
154
  isLogin: true,
155
+ inputType: "password",
156
+ Color: false,
151
157
  // 当前选中的标签
152
158
  curTab: "1",
153
159
 
@@ -190,6 +196,7 @@ export default {
190
196
  methods: {
191
197
  // 获取传入验证码
192
198
  getCodeRequest(type, authCode){
199
+ console.log('getCodeRequest', type, authCode)
193
200
  if(type === 'account'){
194
201
  this.accountFrom.authCode = authCode
195
202
  } else if(type === 'login'){
@@ -199,14 +206,16 @@ export default {
199
206
  }
200
207
  },
201
208
  // 账号登录
202
- getAccountLogin(){
203
- if(!this.accountFrom.authCode){
204
- this.$notify.error({message: '请先验证滑块'});
205
- } else if(!this.accountFrom.username){
209
+ getAccountLogin() {
210
+ if (!this.accountFrom.username) {
206
211
  this.$notify.error({message: '请先输入账号或手机号'});
207
- } else if(!this.accountFrom.password){
212
+ } else if (!this.accountFrom.password) {
208
213
  this.$notify.error({message: '请先输入密码'});
209
- } else {
214
+ } else if(this.isPassingAccount == false) {
215
+ this.$notify.error({message: '请先进行滑块验证'});
216
+ } else if (!this.accountFrom.authCode){
217
+ this.$notify.error({message: '验证滑块码获取失败,请刷新页面,重新获取。'});
218
+ } else {
210
219
  this.$emit('applyAccountLoginRequest', this.accountFrom);
211
220
  }
212
221
  },
@@ -294,7 +303,12 @@ export default {
294
303
  console.warn(`Element with selector ${selector} not found.`);
295
304
  }
296
305
  },
297
-
306
+ // 密码的可见和不可见
307
+ Show() {
308
+ // 点击改变input框的展示方式
309
+ this.inputType = this.inputType === "password" ? "text" : "password";
310
+ this.Color = !this.Color;
311
+ },
298
312
  },
299
313
  mounted() {
300
314
  // 确保在组件挂载后执行 DOM 操作
@@ -582,7 +596,7 @@ a {
582
596
  background-color: #00b85c;
583
597
  transition: all .36s;
584
598
  right: 20px;
585
- color: #ccc;
599
+ //color: #ccc;
586
600
  }
587
601
 
588
602
  .input-box input {
@@ -676,4 +690,8 @@ a {
676
690
  flex-direction: row;
677
691
  justify-content: space-evenly;
678
692
  }
693
+
694
+ .icon {
695
+ color: #028037;
696
+ }
679
697
  </style>