choerodon-ui
Version:
An enterprise-class UI design language and React-based implementation
56 lines (48 loc) • 1.18 kB
JavaScript
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var _isPromise = _interopRequireDefault(require("is-promise"));
var manager = {
key: 1,
config: {
duration: 3,
top: 24,
bottom: 24,
placement: 'leftBottom',
transitionName: 'move-up'
},
remove: function remove(key) {
var instance = this.instance;
if (instance) {
if ((0, _isPromise["default"])(instance)) {
instance.then(function (ins) {
return ins.removeNotice(key);
});
} else {
instance.removeNotice(key);
}
}
},
clear: function clear() {
var instance = this.instance;
if (instance) {
if ((0, _isPromise["default"])(instance)) {
instance.then(function (ins) {
return ins.destroy();
});
} else {
instance.destroy();
}
delete this.instance;
}
},
getUuid: function getUuid() {
return "".concat(this.key++);
}
};
var _default = manager;
exports["default"] = _default;
//# sourceMappingURL=index.js.map