Ver código fonte

左右比列bug

zhongzewei 7 anos atrás
pai
commit
cd74e3b471
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      web/building_saas/main/js/main.js

+ 2 - 0
web/building_saas/main/js/main.js

@@ -184,6 +184,8 @@ function loadSize(eles, type, callback) {
 
 function getResizeWidthPercent(nearSize, farSize){
     const resizeWidth = 6;
+    nearSize = parseFloat(nearSize);
+    farSize = parseFloat(farSize);
     let nearPercent = (nearSize / (resizeWidth + nearSize + farSize) * 100) + '%';
     let farPercent = (farSize / (resizeWidth + nearSize + farSize) * 100) + '%';
     return {nearPercent, farPercent};