Skip to content

Commit

Permalink
修复 loading-mask 传入 text 的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Leopoldthecoder committed May 30, 2016
1 parent 1d2d53f commit 2e1c323
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/service/loading-mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@ var LoadingMask = Vue.extend(require('./loading-mask.vue'));

var instance;
var service = {
open() {
open(text) {
if (!instance) {
const text = this.text;

instance = new LoadingMask({
el: document.createElement('div'),
data() {
return { text };
}
el: document.createElement('div')
});
}
instance.text = text;
Vue.nextTick(() => {
instance.open();
});
Expand Down

0 comments on commit 2e1c323

Please sign in to comment.