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

pull/9437/head
xifeiwu 2018-01-23 14:03:44 +08:00 committed by 杨奕
parent aaf7a87848
commit 68e0573db7
1 changed files with 4 additions and 1 deletions

View File

@ -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;