jwyu 3 жил өмнө
parent
commit
6b9e042f92

+ 2 - 0
src/directive/drag.js

@@ -25,6 +25,8 @@ class Drap{
 
     //按下ele
     onMouseDown(e){
+        // console.log(e);
+        if(!e.target.draggable) return
         let zIndex = getComputedStyle(this.el).getPropertyValue('z-index');
         zIndex=isNaN(zIndex)?1:zIndex
         Drap.zIndex =Drap.zIndex>zIndex?Number(Drap.zIndex)+1:Number(zIndex)+1

+ 1 - 1
src/layout/Index.vue

@@ -180,7 +180,7 @@ store.state.audioData.INS=globalAudioIns
 
     <!-- 全局音频模块 -->
     <div class="global-audio-box" v-if="$store.state.audioData.list.length>0" v-drag="{'zIndex':100}">
-      <div style="height:10px;cursor: move;">
+      <div style="height:10px;cursor: move;" draggable="true">
         <svg @click="handleAudioClose" class="icon" width="20" height="20" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" data-v-042ca774=""><path fill="currentColor" d="M764.288 214.592L512 466.88 259.712 214.592a31.936 31.936 0 00-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1045.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0045.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 10-45.12-45.184z"></path></svg>
       </div>
       <h2 style="text-align:center;font-size:14px;padding:0 20px">{{$store.state.audioData.list[$store.state.audioData.index].voiceName}}</h2>