(name?: string | object, cfg?: object)
| 1517 | showLoading(cfg?: object): void; |
| 1518 | showLoading(name?: string, cfg?: object): void; |
| 1519 | showLoading(name?: string | object, cfg?: object): void { |
| 1520 | if (this._disposed) { |
| 1521 | disposedWarning(this.id); |
| 1522 | return; |
| 1523 | } |
| 1524 | |
| 1525 | if (isObject(name)) { |
| 1526 | cfg = name as object; |
| 1527 | name = ''; |
| 1528 | } |
| 1529 | name = name || 'default'; |
| 1530 | |
| 1531 | this.hideLoading(); |
| 1532 | if (!loadingEffects[name]) { |
| 1533 | if (__DEV__) { |
| 1534 | warn('Loading effects ' + name + ' not exists.'); |
| 1535 | } |
| 1536 | return; |
| 1537 | } |
| 1538 | const el = loadingEffects[name](this._api, cfg); |
| 1539 | const zr = this._zr; |
| 1540 | this._loadingFX = el; |
| 1541 | |
| 1542 | zr.add(el); |
| 1543 | } |
| 1544 | |
| 1545 | /** |
| 1546 | * Hide loading effect |
nothing calls this directly
no test coverage detected