@d-matrix/utils 1.9.1 → 1.9.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/file.d.ts +1 -1
- package/dist/file.js +1 -1
- package/package.json +1 -1
package/dist/file.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export declare function isImageExists(src: string, img?: HTMLImageElement): Prom
|
|
|
36
36
|
export declare function getFilenameFromContentDispositionHeader(header: {
|
|
37
37
|
['content-disposition']: string;
|
|
38
38
|
}): string;
|
|
39
|
-
declare const HyperLinkTargets: readonly ["_self", "
|
|
39
|
+
declare const HyperLinkTargets: readonly ["_self", "_blank", "_parent", "_top"];
|
|
40
40
|
export declare type HyperLinkTarget = (typeof HyperLinkTargets)[number];
|
|
41
41
|
/**
|
|
42
42
|
* 文件下载
|
package/dist/file.js
CHANGED
|
@@ -78,7 +78,7 @@ export function getFilenameFromContentDispositionHeader(header) {
|
|
|
78
78
|
const filename = contentDisposition.split('filename=')[1].split(';')[0];
|
|
79
79
|
return decodeURIComponent(filename);
|
|
80
80
|
}
|
|
81
|
-
const HyperLinkTargets = ['_self', '
|
|
81
|
+
const HyperLinkTargets = ['_self', '_blank', '_parent', '_top'];
|
|
82
82
|
export function download(source, fileName = '', target) {
|
|
83
83
|
const link = document.createElement('a');
|
|
84
84
|
if (typeof source === 'string') {
|