소스 검색

Loading: fix export default for loading directive to avoid grammar error (#9408)

xifeiwu 7 년 전
부모
커밋
68e0573db7
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      packages/loading/src/directive.js

+ 4 - 1
packages/loading/src/directive.js

@@ -4,7 +4,8 @@ import { addClass, removeClass, getStyle } from 'element-ui/src/utils/dom';
 import afterLeave from 'element-ui/src/utils/after-leave';
 const Mask = Vue.extend(Loading);
 
-exports.install = Vue => {
+const loadingDirective = {};
+loadingDirective.install = Vue => {
   if (Vue.prototype.$isServer) return;
   const toggleLoading = (el, binding) => {
     if (binding.value) {
@@ -117,3 +118,5 @@ exports.install = Vue => {
     }
   });
 };
+
+export default loadingDirective;