Skip to content

close 无法关闭 #12

@Pszz

Description

@Pszz

这是运行时,返回的源码
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;
}
}
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions