فهرست منبع

模块数据维护mac不加padding

zhangxc 5 سال پیش
والد
کامیت
571d547691
2فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 3 2
      src/js/moduleManager.js
  2. 7 1
      src/js/utils.js

+ 3 - 2
src/js/moduleManager.js

@@ -6,7 +6,7 @@ require('./modal.js');
 
 // const  layui = require('layui-src');
 const {api} = require('./api.js')
-const {post,getCookie,emptyBox} = require('./utils.js')
+const {post,getCookie,emptyBox,isMac} = require('./utils.js')
 function setTbaleInfoHei(){
  
     $(".tableInfo").css({
@@ -60,7 +60,8 @@ function renderTab(){
     $('.tableInfo table').html(str?str:emptyBox())
     const tableInfoBox =  $(".tableInfo").height()
     const tableInfoHei =  $(".tableInfo table").height()
-    if(tableInfoHei > tableInfoBox){
+    const mac = isMac()
+    if(mac&&tableInfoHei > tableInfoBox){
         $(".tableTitle").css("paddingRight", 15+'px')
     }
     // bindInput()

+ 7 - 1
src/js/utils.js

@@ -297,6 +297,11 @@ function setTitleTxt(dom,from){
     $(dom?dom:".partTitle").find("a").remove()
   }
 }
+
+function isMac(){
+  var isMac = /macintosh|mac os x/i.test(navigator.userAgent);
+  return isMac
+}
 module.exports = {
   pageMap,
   post,
@@ -313,5 +318,6 @@ module.exports = {
   picEmptyData,
   setTitleTxt,
   downloadExportedData,
-  expJson
+  expJson,
+  isMac
 };