项目
版本

Uppy 支持 IE11

我们官方正式支持最新版本的 ChromeFirefoxSafariEdge 浏览器。

Internet Explorer 并未获得官方支持,即我们不对它进行测试,但只要使用了正确的 polyfills(兼容性补丁),你可以较为确信其能正常工作。然而,使用 IE11 仍存在样式或功能方面产生意外结果的风险。

Polyfills(兼容性补丁)

  • npm
    npm install core-js whatwg-fetch abortcontroller-polyfill md-gum-polyfill resize-observer-polyfill
    Bash
  • yarn
    yarn add core-js whatwg-fetch abortcontroller-polyfill md-gum-polyfill resize-observer-polyfill
    Bash
import "core-js"; import "whatwg-fetch"; import "abortcontroller-polyfill/dist/polyfill-patch-fetch"; // Order matters: AbortController needs fetch which needs Promise (provided by core-js). import "md-gum-polyfill"; import ResizeObserver from "resize-observer-polyfill"; window.ResizeObserver ??= ResizeObserver; export { default } from "@uppy/core"; export * from "@uppy/core";
JavaScript

传统 CDN 捆绑包

<!-- 1. Add CSS to `<head>` --> <link href="https://releases.transloadit.com/uppy/v3.27.3/uppy.min.css" rel="stylesheet"> <!-- 2. Initialize --> <div id="uppy"></div> <script type="module"> import { Uppy, DragDrop, Tus } from "https://releases.transloadit.com/uppy/v3.27.3/uppy.legacy.min.js" const uppy = new Uppy() uppy.use(DragDrop, { target: '#uppy' }) uppy.use(Tus, { endpoint: '//tusd.tusdemo.net/files/' }) </script>
JavaScript