mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
perf: 优化大屏的背景渲染方式,提升性能
This commit is contained in:
@@ -100,6 +100,15 @@ export const isMac = () => {
|
||||
return /macintosh|mac os x/i.test(navigator.userAgent)
|
||||
}
|
||||
|
||||
/**
|
||||
* * file转url
|
||||
*/
|
||||
export const fileToUrl = (file:File): string => {
|
||||
const Url = URL || window.URL || window.webkitURL;
|
||||
const ImageUrl = Url.createObjectURL(file);
|
||||
return ImageUrl
|
||||
};
|
||||
|
||||
/**
|
||||
* * file转base64
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user