For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/packages/qrcode-rsbuild-plugin/interfaces/PluginQRCodeOptions.md.
Lynx
  • 简体中文
  • 接口: PluginQRCodeOptions

    pluginQRCode 的选项。

    属性

    fullscreen?

    optional fullscreen?: boolean

    启用 Lynx bundle URL 的全屏变体(追加 ?fullscreen=true,在 LynxExplorer 中打开 bundle 时会隐藏应用内导航栏)。

    启用后,插件会:

    • 在 schema 轮换列表中追加一个 fullscreen 项:二维码仍然 打开默认 schema,在开发控制台中按 a 可切换 到 fullscreen 变体。
    • 在开发服务器打印的每个 Lynx bundle URL 下方追加一行 ∟ Fullscreen URL。

    默认值

    false


    schema?

    optional schema?: CustomizedSchemaFn

    自定义生成的 schema。

    示例

    import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
    import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
    import { defineConfig } from '@rsbuild/core'
    
    export default defineConfig({
      plugins: [
        pluginReactLynx(),
        pluginQRCode({
          schema(url) {
            return `lynx://${url}?dev=1`
          },
        }),
      ],
    })
    • 使用多个 schema:

    可以在终端中按 a 切换 schema。

    import { pluginQRCode } from '@lynx-js/qrcode-rsbuild-plugin'
    import { pluginReactLynx } from '@lynx-js/react-rsbuild-plugin'
    import { defineConfig } from '@rsbuild/core'
    
    export default defineConfig({
      plugins: [
        pluginReactLynx(),
        pluginQRCode({
          schema(url) {
            return {
              http: url,
              foo: `foo://lynx?url=${encodeURIComponent(url)}&dev=1`,
              bar: `bar://lynx?url=${encodeURIComponent(url)}`,
            }
          },
        }),
      ],
    })
    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。