artalk 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Artalk.es.js +5 -5
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/dist/ArtalkLite.es.js +5 -5
- package/dist/ArtalkLite.iife.js +1 -1
- package/dist/ArtalkLite.js +1 -1
- package/package.json +1 -1
- package/src/editor/plugs/upload-plug.ts +1 -1
- package/src/lib/ui.ts +3 -2
- package/types/artalk-config.d.ts +1 -1
package/src/lib/ui.ts
CHANGED
|
@@ -2,7 +2,8 @@ import * as Utils from './utils'
|
|
|
2
2
|
|
|
3
3
|
/** 显示加载 */
|
|
4
4
|
export function showLoading(parentElem: HTMLElement, conf?: { transparentBg?: boolean }) {
|
|
5
|
-
|
|
5
|
+
// Use :scope https://developer.mozilla.org/en-US/docs/Web/CSS/:scope
|
|
6
|
+
let $loading = parentElem.querySelector<HTMLElement>(':scope > .atk-loading')
|
|
6
7
|
if (!$loading) {
|
|
7
8
|
$loading = Utils.createElement(
|
|
8
9
|
`<div class="atk-loading atk-fade-in" style="display: none;">
|
|
@@ -27,7 +28,7 @@ export function showLoading(parentElem: HTMLElement, conf?: { transparentBg?: bo
|
|
|
27
28
|
|
|
28
29
|
/** 隐藏加载 */
|
|
29
30
|
export function hideLoading(parentElem: HTMLElement) {
|
|
30
|
-
const $loading = parentElem.querySelector<HTMLElement>('.atk-loading')
|
|
31
|
+
const $loading = parentElem.querySelector<HTMLElement>(':scope > .atk-loading')
|
|
31
32
|
if ($loading) $loading.style.display = 'none'
|
|
32
33
|
}
|
|
33
34
|
|
package/types/artalk-config.d.ts
CHANGED