@esportsplus/ui 0.12.0 → 0.12.1
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.
|
@@ -2,14 +2,14 @@ import { reactive } from '@esportsplus/reactivity';
|
|
|
2
2
|
import root from '../../components/root/index.js';
|
|
3
3
|
import './scss/index.scss';
|
|
4
4
|
let queue = [], running = false, scheduled = false;
|
|
5
|
-
|
|
5
|
+
function frame() {
|
|
6
6
|
if (running) {
|
|
7
7
|
return;
|
|
8
8
|
}
|
|
9
9
|
running = true;
|
|
10
10
|
let item;
|
|
11
11
|
while (item = queue.pop()) {
|
|
12
|
-
|
|
12
|
+
item();
|
|
13
13
|
}
|
|
14
14
|
running = false;
|
|
15
15
|
}
|
|
@@ -20,7 +20,7 @@ const onclick = (data = {}) => {
|
|
|
20
20
|
return {
|
|
21
21
|
attributes: {
|
|
22
22
|
class: () => {
|
|
23
|
-
return `tooltip ${state.active
|
|
23
|
+
return `tooltip ${state.active && '--active'}`;
|
|
24
24
|
},
|
|
25
25
|
onclick: function (e) {
|
|
26
26
|
let active = true, node = e.target;
|
package/package.json
CHANGED
|
@@ -3,12 +3,12 @@ import root from '~/components/root';
|
|
|
3
3
|
import './scss/index.scss';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
let queue:
|
|
6
|
+
let queue: VoidFunction[] = [],
|
|
7
7
|
running = false,
|
|
8
8
|
scheduled = false;
|
|
9
9
|
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
function frame() {
|
|
12
12
|
if (running) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -18,7 +18,7 @@ async function frame() {
|
|
|
18
18
|
let item;
|
|
19
19
|
|
|
20
20
|
while (item = queue.pop()) {
|
|
21
|
-
|
|
21
|
+
item();
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
running = false;
|
|
@@ -33,7 +33,7 @@ const onclick = (data: { active?: boolean, toggle?: boolean } = {}) => {
|
|
|
33
33
|
return {
|
|
34
34
|
attributes: {
|
|
35
35
|
class: () => {
|
|
36
|
-
return `tooltip ${state.active
|
|
36
|
+
return `tooltip ${state.active && '--active'}`;
|
|
37
37
|
},
|
|
38
38
|
onclick: function(this: HTMLElement, e: Event) {
|
|
39
39
|
let active = true,
|