Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

close 无法关闭 #12

Open
Pszz opened this issue Dec 8, 2017 · 0 comments
Open

close 无法关闭 #12

Pszz opened this issue Dec 8, 2017 · 0 comments

Comments

@Pszz
Copy link

Pszz commented Dec 8, 2017

这是运行时,返回的源码
open时,用了nextTick,close时没有,导致过早调用close 无法关闭。
并且发现loading打开时,整个页面的遮罩层没有,不知道是否用法有问题?

/* harmony default export */ exports["default"] = {
open: function open(options) {
if ( options === void 0 ) options = {};

if (!instance) {
  instance = new Indicator({
    el: document.createElement('div')
  });
}
if (instance.visible) return;
instance.text = typeof options === 'string' ? options : options.text || '';
instance.spinnerType = options.spinnerType || 'snake';
document.body.appendChild(instance.$el);

__WEBPACK_IMPORTED_MODULE_0_vue___default.a.nextTick(function () {
  instance.visible = true;
});

},

close: function close() {
if (instance) {
instance.visible = false;
}
}
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant