密码禁止粘贴
This commit is contained in:
@@ -31,6 +31,7 @@
|
||||
v-decorator="['password',{initialValue:'', rules: validatorRules.password.rules,validateTrigger: 'blur'}]"
|
||||
size="large"
|
||||
type="password"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
placeholder="请输入密码"
|
||||
>
|
||||
@@ -49,7 +50,8 @@
|
||||
size="large"
|
||||
type="text"
|
||||
@change="inputCodeChange"
|
||||
autocomplete="off"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
placeholder="请输入验证码">
|
||||
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}"/>
|
||||
</a-input>
|
||||
@@ -88,6 +90,7 @@
|
||||
size="large"
|
||||
v-decorator="['captcha', { rules: validatorRules.captcha.rules,validateTrigger: 'blur'}]"
|
||||
type="text"
|
||||
autocomplete="false"
|
||||
placeholder="请输入验证码">
|
||||
<a-icon slot="prefix" type="safety" :style="{ color: '#B3B7C2',fontSize:'20px'}"/>
|
||||
</a-input>
|
||||
@@ -405,6 +408,10 @@ export default {
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<a-input
|
||||
v-decorator="['captcha', { rules: validatorRules.captcha.rules}]"
|
||||
type="text"
|
||||
autocomplete="off"
|
||||
autocomplete="false"
|
||||
placeholder="验证码">
|
||||
</a-input>
|
||||
<a-button
|
||||
@@ -58,6 +58,8 @@
|
||||
<a-input
|
||||
placeholder="新密码"
|
||||
v-decorator="['password', { rules: validatorRules.password.rules}]"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false"
|
||||
type="password">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -74,6 +76,7 @@
|
||||
placeholder="确认密码"
|
||||
v-decorator="['confirmPassword', { rules: validatorRules.confirmPassword.rules}]"
|
||||
type="password"
|
||||
@paste.native.capture.prevent="handleOperate"
|
||||
autocomplete="false">
|
||||
</a-input>
|
||||
</a-form-item>
|
||||
@@ -262,6 +265,10 @@ export default {
|
||||
getRSAPublicKey().then(res => {
|
||||
this.rsaPublicKey = res.result
|
||||
})
|
||||
},
|
||||
// 密码禁止粘贴
|
||||
handleOperate() {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user