This commit is contained in:
		
							parent
							
								
									f08a39d0ee
								
							
						
					
					
						commit
						19c6246603
					
				| 
						 | 
				
			
			@ -29,7 +29,7 @@
 | 
			
		|||
          class="menuFor"
 | 
			
		||||
          v-for="(item, index) in quanping"
 | 
			
		||||
          :key="index"
 | 
			
		||||
          @click="handleMenuClick(item)"
 | 
			
		||||
          @click="handlefdClick(item)"
 | 
			
		||||
        >
 | 
			
		||||
          <div class="itemIcon">
 | 
			
		||||
            <img :src="item.icon" :alt="item.name" />
 | 
			
		||||
| 
						 | 
				
			
			@ -250,6 +250,28 @@ export default {
 | 
			
		|||
      });
 | 
			
		||||
      this.dialog = false;
 | 
			
		||||
    },
 | 
			
		||||
    handlefdClick(value) {
 | 
			
		||||
      if (document.fullscreenElement) {
 | 
			
		||||
        document
 | 
			
		||||
          .exitFullscreen()
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            console.log("退出全屏模式");
 | 
			
		||||
          })
 | 
			
		||||
          .catch((err) => {
 | 
			
		||||
            console.error(`退出全屏模式失败: ${err.message}`);
 | 
			
		||||
          });
 | 
			
		||||
      } else {
 | 
			
		||||
        document.documentElement
 | 
			
		||||
          .requestFullscreen()
 | 
			
		||||
          .then(() => {
 | 
			
		||||
            console.log("进入全屏模式");
 | 
			
		||||
          })
 | 
			
		||||
          .catch((err) => {
 | 
			
		||||
            console.error(`进入全屏模式失败: ${err.message}`);
 | 
			
		||||
          });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    handleMenuClick(value) {
 | 
			
		||||
      this.activeId = value.id; // 点击时更新激活的ID
 | 
			
		||||
      this.title = value.name; // 点击时更新对话框标题
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue