maa3606 2 lat temu
rodzic
commit
3d680974df
1 zmienionych plików z 4 dodań i 3 usunięć
  1. 4 3
      resources/js/src/views/lottery/Slot.vue

+ 4 - 3
resources/js/src/views/lottery/Slot.vue

@@ -274,7 +274,7 @@ export default {
 		});
 
 		this.bodyListener = (e) => {
-			if (e.keyCode === 13 || e.keyCode === 32 && e.target === document.body) {
+			if ((e.keyCode === 13 || e.keyCode === 32) && e.target === document.body) {
 				console.log("enter");
 				this.draw();
 			}
@@ -323,6 +323,7 @@ export default {
 				this.drawOption.prize_name = params.name;
 				this.drawOption.prize_id = params.id;
 				this.showDraw();
+				this.count();
 			} else {
 				this.showDrawError();
 			}
@@ -350,7 +351,7 @@ export default {
 
 		},
 		recieve(e) {
-			e.target.blur();
+			e.currentTarget.blur();
 			if (this.isDrawn) {
 				var idList = [];
 				this.drawList.forEach(element => {
@@ -371,7 +372,7 @@ export default {
 			}
 		},
 		restart(e) {
-			e.target.blur();
+			e.currentTarget.blur();
 			if (this.isDrawn) {
 				var idList = [];
 				this.drawList.forEach(element => {