Your Name 3 anos atrás
pai
commit
29ae14fbe1

+ 1 - 0
src/components/MarkerMap/index.scss

@@ -169,6 +169,7 @@
             position:absolute;
             top:-50px;
             transform: translateX(-50%);
+            left:50%;
             padding:10px;
             height:20px;
             background:rgba($color: #000f56, $alpha: 0.7);

+ 5 - 1
src/components/MarkerMap/index.tsx

@@ -801,9 +801,13 @@ export default defineComponent({
                 offset: [-25, -25],
               });
 
+        if(type==="单兵"){
+          i.name = i.userName;
+        }
+
         imagep.onmouseover = ()=>{
           //console.log(222)
-         
+           
            imagep.innerHTML = `<div style="position:relative"><div class="tipc">${i.name}</div></div>`
            markp.setZIndex(111);
         };