Browse Source

修改B2B文件下载上传问题

shenjj 7 years ago
parent
commit
33c4555eff
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/main/webapp/resources/js/common/directives.js

+ 14 - 1
src/main/webapp/resources/js/common/directives.js

@@ -11,7 +11,20 @@ define(['angular', 'showdown', 'angular-toaster'], function(angular) {
 				});
 			}
 		};
-	}).directive('datetrigger', ['$parse', function($parse) {
+	}).directive('scrollTable', [function () {
+    // table 固定表头
+    return {
+      restrict: 'A',
+      link: function (scope, element, attrs, ngModel) {
+        var header = element.find('.table-header-wrap'), body = element.find('.table-body-wrap');
+        if (header && body) {
+          body.bind('scroll', function () {
+            header.scrollLeft(body.scrollLeft());
+          });
+        }
+      }
+    };
+  }]).directive('datetrigger', ['$parse', function($parse) {
 		return {
 			restrict: 'EA',
 			transclude: true,