zhengkaixin 1 jaar geleden
bovenliggende
commit
e0522e186d
1 gewijzigde bestanden met toevoegingen van 34 en 4 verwijderingen
  1. 34 4
      pagesFinance/statistics/index.vue

+ 34 - 4
pagesFinance/statistics/index.vue

@@ -637,7 +637,8 @@
 				step: 0,
 				stepname: '',
 				startTime: '',
-				stepid: 0,
+				stepid: 0,
+				windowWidth:0,
 
 			}
 		},
@@ -658,9 +659,12 @@
 		},
 		onLoad() {
 
-
+			
 			this.info = this.carhelp.getPersonInfo()
-			this.title = this.info.merchantAccountName
+			this.title = this.info.merchantAccountName
+			uni.getSystemInfo().then(e=>{
+				this.windowWidth=e[1].windowWidth
+			})
 		},
 		components: {
 			Tabbar
@@ -1206,7 +1210,33 @@
 				var option = {
 
 					tooltip: {
-
+						  position: (e)=>{
+							  var x=e[0]
+							   var y=e[1]
+							  // if(y<50){
+								 //   y+=20
+							  // }
+							  // console.log(e)
+							  // return [x,y]
+							  if(this.windowWidth){
+								  if(y<100){
+									  if(x<this.windowWidth/2){
+									  		return ['30%','60%']
+									  }else{
+										  return ['10%','60%']
+									  }
+								  }else{
+									  if(x<this.windowWidth/2){
+									  		return ['30%','-45%']
+									  }else{
+									  		return ['10%','-45%']
+									  }
+								  }
+								
+								 
+							  }
+							  
+						  },
 						formatter: (value) => {
 							//getPie
 							var name = value[0].data[0];