shish 6 月之前
父节点
当前提交
7627ed9c7e
共有 1 个文件被更改,包括 12 次插入9 次删除
  1. 12 9
      hdPad/src/pages/home/components/hb-select.vue

+ 12 - 9
hdPad/src/pages/home/components/hb-select.vue

@@ -112,6 +112,7 @@ export default {
 	},
 	methods: {
 		openPopup() {
+			this.$util.hitVoice()
 			this.currentSelectedId = this.value; // Reset to current value when opening
 			this.$refs.popup.open();
 		},
@@ -119,17 +120,19 @@ export default {
 			this.$refs.popup.close();
 		},
 		selectHb(item) {
+			this.$util.hitVoice()
 			this.currentSelectedId = item ? item.id : null;
 		},
-	confirmSelection() {
-		this.$emit('input', this.currentSelectedId); // Update v-model
-            const selectedItem = this.hbData.find(item => item.id == this.currentSelectedId);
-		this.$emit('change', selectedItem || null);
-		this.closePopup();
-	},
-	cancelSelection() {
-		this.closePopup();
-	},
+		confirmSelection() {
+			this.$util.hitVoice()
+			this.$emit('input', this.currentSelectedId)
+			const selectedItem = this.hbData.find(item => item.id == this.currentSelectedId)
+			this.$emit('change', selectedItem || null)
+			this.closePopup()
+		},
+		cancelSelection() {
+			this.closePopup();
+		},
 		formatTime(timestamp) {
 			if (!timestamp) return '';
 			let date;