Skip to content

createRouter 方法参数不对 #18651

@xiaoxiyao

Description

@xiaoxiyao

请先确认

  • 我已搜索并确定这个提交不是重复的

Taro 版本

v4

相关领域

H5 路由

使用框架

React

相关平台

  • 所有平台
  • Web 端(H5)
  • 移动端(React-Native)
  • 鸿蒙(Harmony)
  • 鸿蒙容器(Harmony Hybrid)
  • ASCF 元服务
  • 快应用(QuickApp)
  • 所有小程序
  • 微信小程序
  • 企业微信小程序
  • 京东小程序
  • 百度小程序
  • 支付宝小程序
  • 支付宝 IOT 小程序
  • 头条小程序
  • QQ 小程序
  • 钉钉小程序
  • 飞书小程序
  • 快手小程序

小程序基础库版本

No response

问题描述

export function createRouter (
history: History,
app: AppInstance,
config: SpaRouterConfig,
framework?: string

framework参数应该传字符串,但实际传递的是React对象。
${routerCreator}(history, inst, config, ${options.loaderMeta.importFrameworkName})

Image

复现链接

复现步骤

如上

环境信息

👽 Taro v4.1.8                                                                


  Taro CLI 4.1.8 environment info:
    System:
      OS: Windows 11 10.0.26200
    Binaries:
      Node: 20.18.1
      npm: 11.6.1

开源贡献

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-routerArea - H5 路由相关F-reactFramework - ReactT-h5Target - 编译到 H5V-4Version - 4.xbugSomething isn't working

    Type

    No type

    Projects

    Status

    Padding

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions