/** 把 URL 内容下载后的数据转换为本地的 URL * 即 URL.createObjectURL() */ export function urlToLocalUrl(url: string): Promise { return fetch(url) .then((response) => response.blob()) .then((blob) => URL.createObjectURL(blob)) }