mirror of https://github.com/ElemeFE/element
(cherry picked from commit 64d37e0175
)
pull/22576/head
parent
f14b5ba540
commit
04a3d934da
|
@ -113,6 +113,8 @@ loadingDirective.install = Vue => {
|
||||||
|
|
||||||
update: function(el, binding) {
|
update: function(el, binding) {
|
||||||
el.instance.setText(el.getAttribute('element-loading-text'));
|
el.instance.setText(el.getAttribute('element-loading-text'));
|
||||||
|
el.instance.setSpinner(el.getAttribute('element-loading-spinner'));
|
||||||
|
el.instance.setBackground(el.getAttribute('element-loading-background'));
|
||||||
if (binding.oldValue !== binding.value) {
|
if (binding.oldValue !== binding.value) {
|
||||||
toggleLoading(el, binding);
|
toggleLoading(el, binding);
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,12 @@
|
||||||
},
|
},
|
||||||
setText(text) {
|
setText(text) {
|
||||||
this.text = text;
|
this.text = text;
|
||||||
|
},
|
||||||
|
setSpinner(spinner) {
|
||||||
|
this.spinner = spinner;
|
||||||
|
},
|
||||||
|
setBackground(background) {
|
||||||
|
this.background = background;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue