• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • <Suspense>

    用于编排组件树中的嵌套异步依赖项。

    类型

    interface SuspenseProps {
      timeout?: string | number
    }
    

    活动:

    • @resolve
    • @pending
    • @fallback


    细节

    <Suspense>接受两个插槽:#default插槽和#fallback插槽。它将在渲染内存中的默认插槽时显示后备插槽的内容。

    如果它在渲染默认槽时遇到异步依赖项(Async Components和 components with async setup()),它将等到所有这些都解决后再显示默认槽。

    上篇:<teleport>