bug修复
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
62d5b39036
commit
9bd6c1f433
|
@ -456,10 +456,12 @@ export default {
|
|||
},
|
||||
// 输入框输入事件
|
||||
setPassword(val) {
|
||||
console.log(val)
|
||||
if (this.isShowPassword) {
|
||||
this.loginForm.password = val
|
||||
} else {
|
||||
let reg = /[0-9a-zA-Z]/g // 只允许输入字母和数字
|
||||
let reg =
|
||||
/^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[-_.@^+\$!%#*?&\$~])[A-Za-z0-9-~_.@^+\$~!%#*?&]{8,32}$/g // 只允许输入字母和数字
|
||||
let nDot = /[^●]/g // 非圆点字符
|
||||
let index = -1 // 新输入的字符位置
|
||||
let lastChar = void 0 // 新输入的字符
|
||||
|
@ -475,11 +477,13 @@ export default {
|
|||
}
|
||||
})
|
||||
// 判断输入的字符是否符合规范,不符合的话去掉该字符
|
||||
if (lastChar && !reg.test(lastChar)) {
|
||||
coverArr.splice(index, 1)
|
||||
this.pwdCover = coverArr.join('')
|
||||
return
|
||||
}
|
||||
// if (lastChar && !reg.test(lastChar)) {
|
||||
// coverArr.splice(index, 1)
|
||||
// this.pwdCover = coverArr.join('')
|
||||
// console.log(111111111111111, lastChar)
|
||||
// // return
|
||||
// }
|
||||
if (coverLen - realLen <= 2) {
|
||||
if (realLen < coverLen) {
|
||||
// 新增字符
|
||||
realArr.splice(index, 0, lastChar)
|
||||
|
@ -491,9 +495,13 @@ export default {
|
|||
let pos = document.getElementById('pwd').selectionEnd // 获取光标位置
|
||||
realArr.splice(pos, realLen - coverLen)
|
||||
}
|
||||
}
|
||||
|
||||
// 将 pwdCover 替换成 ●
|
||||
this.pwdCover = val.replace(/\S/g, '●')
|
||||
this.loginForm.password = realArr.join('')
|
||||
let v = val.replace(/●/g, '')
|
||||
this.loginForm.password =
|
||||
coverLen - realLen >= 2 ? realArr.join('') + v : realArr.join('')
|
||||
}
|
||||
},
|
||||
// 点击右侧小眼睛控制显示隐藏
|
||||
|
|
|
@ -494,11 +494,13 @@ export default {
|
|||
openEdit() {
|
||||
this.form = defaultForm()
|
||||
Object.keys(this.form).forEach((key) => {
|
||||
if (this.DATA[key]) {
|
||||
if (this.DATA[key] || this.DATA[key] == 0) {
|
||||
this.form[key] = this.DATA[key]
|
||||
}
|
||||
})
|
||||
this.model_cfg.visible = true
|
||||
console.log(this.form)
|
||||
console.log(this.DATA)
|
||||
},
|
||||
handleCancle() {
|
||||
this.form = defaultForm()
|
||||
|
|
|
@ -73,7 +73,7 @@ export default {
|
|||
}
|
||||
let id = await this.useUserIDGetDoctorID()
|
||||
const routeData = this.$router.resolve({
|
||||
path: `/curriculumVitae?id=${id}&&lang=${this.$i18n.locale}`,
|
||||
path: `/curriculumVitae?Id=${id}&&lang=${this.$i18n.locale}`,
|
||||
})
|
||||
this.open = window.open(routeData.href, '_blank')
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue