Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Taro微信小程序引入页面插件时应支持传入config #17465

Open
KitaLance opened this issue Mar 19, 2025 · 0 comments
Open

Taro微信小程序引入页面插件时应支持传入config #17465

KitaLance opened this issue Mar 19, 2025 · 0 comments

Comments

@KitaLance
Copy link

KitaLance commented Mar 19, 2025

这个特性解决了什么问题?

目前在使用微信小程序的地图插件 ,发现无法在app.config.ts中配置export,以致页面插件跳转后没有callback可以传入

{
  "plugins": {
    "address-form": {
      "version": "[plugin-version]",
      "provider": "wx57d7ae552cbb3084",
      "export": "config.js" // 目前无法配置export
    }
  }
}

复现:

  1. 配置app.config.ts如下:
plugins: {
    'address-form': {
      version: '1.0.2',
      provider: 'wx57d7ae552cbb3084',
    },
  },

2.在使用处跳转至插件页面

Taro.navigateTo({ url: 'plugin://address-form/index' });
  1. 出现报错
TypeError: requireMiniProgram(...) is not a function

这个 API 长什么样?

能有个入口配置plugin config,传入插件页面需要的callback和参数

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant