Skip to content

Commit

Permalink
Merge pull request #42 from Leopoldthecoder/master
Browse files Browse the repository at this point in the history
修复 loading-mask 传入 text 的问题
  • Loading branch information
Leopoldthecoder committed Jun 3, 2016
2 parents 771fd17 + 38fca9b commit 9d88728
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-desktop",
"version": "0.2.21",
"version": "0.2.23",
"description": "A UI library for building admin panel website.",
"main": "lib/index.js",
"scripts": {
Expand Down
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 9d88728

Please sign in to comment.