|
@@ -18,6 +18,8 @@
|
|
|
v-model="userPass"
|
|
|
@keyup.stop="passTxtKeyUp($event)"
|
|
|
v-loading.fullscreen.lock="fullscreenLoading"
|
|
|
+ @contextmenu="passTextContextmenuEvent($event)"
|
|
|
+ @keydown="passTxtKeyDown($event)"
|
|
|
/>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -84,6 +86,21 @@ export default {
|
|
|
passTxtKeyUp: function (event) {
|
|
|
if (event.keyCode == 13) this.startLogin();
|
|
|
},
|
|
|
+ //密码框鼠标右键事件
|
|
|
+ passTextContextmenuEvent: function (event) {
|
|
|
+ event.preventDefault();
|
|
|
+ return false;
|
|
|
+ },
|
|
|
+ //密码框键盘按下事件
|
|
|
+ passTxtKeyDown: function (event) {
|
|
|
+ var keycode = event.keyCode;
|
|
|
+ var key = String.fromCharCode(keycode).toLowerCase();
|
|
|
+ //禁止复制
|
|
|
+ if (event.ctrlKey && key == "c") {
|
|
|
+ event.preventDefault();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {},
|