@douyinfe/semi-foundation 2.74.1-alpha.5 → 2.74.1-alpha.6
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.
|
@@ -17,6 +17,7 @@ class LottieFoundation extends _foundation.default {
|
|
|
17
17
|
this.animation = null;
|
|
18
18
|
this.handleParamsUpdate = () => {
|
|
19
19
|
var _a;
|
|
20
|
+
if (!this.animation) return;
|
|
20
21
|
this.animation.destroy();
|
|
21
22
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
22
23
|
(_a = this.getProp("getAnimationInstance")) === null || _a === void 0 ? void 0 : _a(this.animation);
|
|
@@ -25,14 +26,15 @@ class LottieFoundation extends _foundation.default {
|
|
|
25
26
|
init(lifecycle) {
|
|
26
27
|
var _a, _b;
|
|
27
28
|
super.init(lifecycle);
|
|
29
|
+
if (!lottie) return;
|
|
28
30
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
29
31
|
(_a = this.getProp("getAnimationInstance")) === null || _a === void 0 ? void 0 : _a(this.animation);
|
|
30
32
|
(_b = this.getProp("getLottie")) === null || _b === void 0 ? void 0 : _b(LottieFoundation.getLottie());
|
|
31
33
|
}
|
|
32
34
|
destroy() {
|
|
33
|
-
var _a;
|
|
34
35
|
super.destroy();
|
|
35
|
-
(
|
|
36
|
+
if (!this.animation) return;
|
|
37
|
+
this.animation.destroy();
|
|
36
38
|
}
|
|
37
39
|
}
|
|
38
40
|
LottieFoundation.getLottie = () => {
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("custom" | "auto")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
|
@@ -11,6 +11,7 @@ class LottieFoundation extends BaseFoundation {
|
|
|
11
11
|
this.animation = null;
|
|
12
12
|
this.handleParamsUpdate = () => {
|
|
13
13
|
var _a;
|
|
14
|
+
if (!this.animation) return;
|
|
14
15
|
this.animation.destroy();
|
|
15
16
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
16
17
|
(_a = this.getProp("getAnimationInstance")) === null || _a === void 0 ? void 0 : _a(this.animation);
|
|
@@ -19,14 +20,15 @@ class LottieFoundation extends BaseFoundation {
|
|
|
19
20
|
init(lifecycle) {
|
|
20
21
|
var _a, _b;
|
|
21
22
|
super.init(lifecycle);
|
|
23
|
+
if (!lottie) return;
|
|
22
24
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
23
25
|
(_a = this.getProp("getAnimationInstance")) === null || _a === void 0 ? void 0 : _a(this.animation);
|
|
24
26
|
(_b = this.getProp("getLottie")) === null || _b === void 0 ? void 0 : _b(LottieFoundation.getLottie());
|
|
25
27
|
}
|
|
26
28
|
destroy() {
|
|
27
|
-
var _a;
|
|
28
29
|
super.destroy();
|
|
29
|
-
(
|
|
30
|
+
if (!this.animation) return;
|
|
31
|
+
this.animation.destroy();
|
|
30
32
|
}
|
|
31
33
|
}
|
|
32
34
|
LottieFoundation.getLottie = () => {
|
|
@@ -18,7 +18,7 @@ declare const strings: {
|
|
|
18
18
|
DRAG_AREA_ILLEGAL: string;
|
|
19
19
|
TRIGGER_AUTO: "auto";
|
|
20
20
|
TRIGGER_CUSTOM: "custom";
|
|
21
|
-
UPLOAD_TRIGGER: ("
|
|
21
|
+
UPLOAD_TRIGGER: ("custom" | "auto")[];
|
|
22
22
|
VALIDATE_STATUS: readonly ["default", "error", "warning", "success"];
|
|
23
23
|
PROMPT_POSITION: readonly ["left", "right", "bottom"];
|
|
24
24
|
};
|
package/lottie/foundation.ts
CHANGED
|
@@ -36,12 +36,14 @@ class LottieFoundation <P = Record<string, any>, S = Record<string, any>> extend
|
|
|
36
36
|
|
|
37
37
|
init(lifecycle?: any) {
|
|
38
38
|
super.init(lifecycle);
|
|
39
|
+
if (!lottie) return;
|
|
39
40
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
40
41
|
this.getProp("getAnimationInstance")?.(this.animation);
|
|
41
42
|
this.getProp("getLottie")?.(LottieFoundation.getLottie());
|
|
42
43
|
}
|
|
43
44
|
|
|
44
45
|
handleParamsUpdate = () => {
|
|
46
|
+
if (!this.animation) return;
|
|
45
47
|
this.animation.destroy();
|
|
46
48
|
this.animation = lottie.loadAnimation(this._adapter.getLoadParams());
|
|
47
49
|
this.getProp("getAnimationInstance")?.(this.animation);
|
|
@@ -49,7 +51,8 @@ class LottieFoundation <P = Record<string, any>, S = Record<string, any>> extend
|
|
|
49
51
|
|
|
50
52
|
destroy() {
|
|
51
53
|
super.destroy();
|
|
52
|
-
this.animation
|
|
54
|
+
if (!this.animation) return;
|
|
55
|
+
this.animation.destroy();
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.74.1-alpha.
|
|
3
|
+
"version": "2.74.1-alpha.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"*.scss",
|
|
30
30
|
"*.css"
|
|
31
31
|
],
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "6b6622dd4b414cacf9c5af54abf2e63ca3e328f2",
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
35
35
|
"@babel/preset-env": "^7.15.8",
|