hookehuyr

refactor(InfoPopup): 优化弹窗显示时的音频处理逻辑

将音频处理逻辑从infoWindow监听器移至show监听器,简化代码结构
...@@ -133,11 +133,7 @@ export default { ...@@ -133,11 +133,7 @@ export default {
133 watch: { 133 watch: {
134 show(val) { 134 show(val) {
135 this.show_popup = val; 135 this.show_popup = val;
136 - }, 136 + // 当弹窗显示时,检查是否有音频需要处理
137 - rect(val) {
138 - this.widow_info = val;
139 - },
140 - infoWindow(val) {
141 if (val) { 137 if (val) {
142 if (this.info?.details.length && this.info?.details[this.isActive]['audio']) { // 实体有音频时 138 if (this.info?.details.length && this.info?.details[this.isActive]['audio']) { // 实体有音频时
143 // 存放到pinia里面控制 139 // 存放到pinia里面控制
...@@ -148,6 +144,9 @@ export default { ...@@ -148,6 +144,9 @@ export default {
148 } 144 }
149 } 145 }
150 }, 146 },
147 + rect(val) {
148 + this.widow_info = val;
149 + },
151 audio_status (v) { 150 audio_status (v) {
152 if (v === 'pause') { 151 if (v === 'pause') {
153 this.voice_pause() 152 this.voice_pause()
......