• 首页
  • vue
  • TypeScript
  • JavaScript
  • scss
  • css3
  • html5
  • php
  • MySQL
  • redis
  • jQuery
  • pipeToWebWritable()

    渲染并通过管道传输到现有的 Web WritableStream 实例。

    导出自vue/server-renderer

    类型

    function pipeToWebWritable(
      input: App | VNode,
      context: SSRContext = {},
      writable: WritableStream
    ): void
    


    例子

    这通常与以下组合使用 TransformStream:

    // TransformStream is available in environments such as CloudFlare workers.
    // in Node.js, TransformStream needs to be explicitly imported from 'stream/web'
    const { readable, writable } = new TransformStream()
    pipeToWebWritable(app, {}, writable)
    
    return new Response(readable)