@douyinfe/semi-foundation 2.42.0 → 2.42.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/image/previewInnerFoundation.ts +1 -1
- package/lib/cjs/image/previewInnerFoundation.js +1 -1
- package/lib/cjs/navigation/subNavFoundation.js +3 -1
- package/lib/cjs/tooltip/foundation.js +1 -0
- package/lib/es/image/previewInnerFoundation.js +1 -1
- package/lib/es/navigation/subNavFoundation.js +3 -1
- package/lib/es/tooltip/foundation.js +1 -0
- package/navigation/subNavFoundation.ts +3 -1
- package/package.json +3 -3
- package/tooltip/foundation.ts +1 -0
|
@@ -132,7 +132,7 @@ export default class PreviewInnerFoundation<P = Record<string, any>, S = Record<
|
|
|
132
132
|
const { currentIndex, imgSrc } = this.getStates();
|
|
133
133
|
const setDownloadName = this._adapter.getSetDownloadFunc();
|
|
134
134
|
const downloadSrc = imgSrc[currentIndex];
|
|
135
|
-
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1);
|
|
135
|
+
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1).split('?')[0];
|
|
136
136
|
downloadImage(downloadSrc, downloadName);
|
|
137
137
|
this._adapter.notifyDownload(downloadSrc, currentIndex);
|
|
138
138
|
}
|
|
@@ -117,7 +117,7 @@ class PreviewInnerFoundation extends _foundation.default {
|
|
|
117
117
|
} = this.getStates();
|
|
118
118
|
const setDownloadName = this._adapter.getSetDownloadFunc();
|
|
119
119
|
const downloadSrc = imgSrc[currentIndex];
|
|
120
|
-
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1);
|
|
120
|
+
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1).split('?')[0];
|
|
121
121
|
(0, _utils.downloadImage)(downloadSrc, downloadName);
|
|
122
122
|
this._adapter.notifyDownload(downloadSrc, currentIndex);
|
|
123
123
|
};
|
|
@@ -33,7 +33,9 @@ class SubNavFoundation extends _foundation.default {
|
|
|
33
33
|
// this.log('invoke SubNavFoundation init()');
|
|
34
34
|
this._timer = null;
|
|
35
35
|
}
|
|
36
|
-
destroy() {
|
|
36
|
+
destroy() {
|
|
37
|
+
this.clearDelayTimer();
|
|
38
|
+
}
|
|
37
39
|
clearDelayTimer() {
|
|
38
40
|
if (this._timer) {
|
|
39
41
|
clearTimeout(this._timer);
|
|
@@ -230,6 +230,7 @@ class Tooltip extends _foundation.default {
|
|
|
230
230
|
this._adapter.unregisterClickOutsideHandler();
|
|
231
231
|
this.unBindResizeEvent();
|
|
232
232
|
this.unBindScrollEvent();
|
|
233
|
+
clearTimeout(this._timer);
|
|
233
234
|
}
|
|
234
235
|
_bindTriggerEvent(triggerEventSet) {
|
|
235
236
|
this._adapter.registerTriggerEvent(triggerEventSet);
|
|
@@ -110,7 +110,7 @@ export default class PreviewInnerFoundation extends BaseFoundation {
|
|
|
110
110
|
} = this.getStates();
|
|
111
111
|
const setDownloadName = this._adapter.getSetDownloadFunc();
|
|
112
112
|
const downloadSrc = imgSrc[currentIndex];
|
|
113
|
-
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1);
|
|
113
|
+
const downloadName = setDownloadName ? setDownloadName(downloadSrc) : downloadSrc.slice(downloadSrc.lastIndexOf("/") + 1).split('?')[0];
|
|
114
114
|
downloadImage(downloadSrc, downloadName);
|
|
115
115
|
this._adapter.notifyDownload(downloadSrc, currentIndex);
|
|
116
116
|
};
|
|
@@ -26,7 +26,9 @@ export default class SubNavFoundation extends BaseFoundation {
|
|
|
26
26
|
// this.log('invoke SubNavFoundation init()');
|
|
27
27
|
this._timer = null;
|
|
28
28
|
}
|
|
29
|
-
destroy() {
|
|
29
|
+
destroy() {
|
|
30
|
+
this.clearDelayTimer();
|
|
31
|
+
}
|
|
30
32
|
clearDelayTimer() {
|
|
31
33
|
if (this._timer) {
|
|
32
34
|
clearTimeout(this._timer);
|
|
@@ -223,6 +223,7 @@ export default class Tooltip extends BaseFoundation {
|
|
|
223
223
|
this._adapter.unregisterClickOutsideHandler();
|
|
224
224
|
this.unBindResizeEvent();
|
|
225
225
|
this.unBindScrollEvent();
|
|
226
|
+
clearTimeout(this._timer);
|
|
226
227
|
}
|
|
227
228
|
_bindTriggerEvent(triggerEventSet) {
|
|
228
229
|
this._adapter.registerTriggerEvent(triggerEventSet);
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@douyinfe/semi-foundation",
|
|
3
|
-
"version": "2.42.
|
|
3
|
+
"version": "2.42.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build:lib": "node ./scripts/compileLib.js",
|
|
7
7
|
"prepublishOnly": "npm run build:lib"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@douyinfe/semi-animation": "2.42.
|
|
10
|
+
"@douyinfe/semi-animation": "2.42.2",
|
|
11
11
|
"async-validator": "^3.5.0",
|
|
12
12
|
"classnames": "^2.2.6",
|
|
13
13
|
"date-fns": "^2.29.3",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"*.scss",
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "b3f0c8dcfe99018798e64505557fdc5cf3ccf4c3",
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@babel/plugin-transform-runtime": "^7.15.8",
|
|
29
29
|
"@babel/preset-env": "^7.15.8",
|
package/tooltip/foundation.ts
CHANGED
|
@@ -113,6 +113,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
|
|
|
113
113
|
this._adapter.unregisterClickOutsideHandler();
|
|
114
114
|
this.unBindResizeEvent();
|
|
115
115
|
this.unBindScrollEvent();
|
|
116
|
+
clearTimeout(this._timer);
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
_bindTriggerEvent(triggerEventSet: Record<string, any>) {
|