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

【报Bug】Vue3 配置 vite.config.ts 后,使用百度动态库组件,入参为 undefined #3864

Closed
Miaamen opened this issue Sep 19, 2022 · 4 comments
Assignees
Labels
bug Something isn't working mp-baidu 百度小程序 vue3

Comments

@Miaamen
Copy link

Miaamen commented Sep 19, 2022

问题描述
Vue3 项目,配置 vite.config.ts 后,使用百度动态库组件(这里举例一站式互动组件),传入 commentParam 为 undefined,导致组件功能不能正常使用。

复现步骤

  1. 开启 Vue3 项目,配置 vite.config.ts,引入 plugins: [uni()];
  2. manifest.json - mp-baidu 配置动态库 dynamicLib;
  3. pages.json 使用 usingSwanComponents 引入动态库组件;
  4. 页面里使用动态库组件,在 setup 里写入参数,在 template 上传入参数;
  5. 一站式互动组件渲染失败;

预期结果
一站式互动组件动态库入参成功,正常渲染;

实际结果
一站式互动组件动态库入参为 undefined,非正常渲染;

系统信息:

  • 发行平台: 百度小程序
  • 操作系统: 安卓 iOS 双端
  • uni-app版本:3.0.0-alpha-3050420220804004
@StrivingRabbit
Copy link
Collaborator

请详细说明使用情况,最好带上一个 demo

@Miaamen
Copy link
Author

Miaamen commented Sep 22, 2022

请详细说明使用情况,最好带上一个演示

https://github.com/Miaamen/uni-demo/tree/main/my-vue3-project
写了个 demo:

  1. yarn install
  2. yarn dev:mp-baidu
  3. 百度开发者工具打开预览

预期:一站式互动组件可以正常评论,而不是提示评论失败。

vue2 demo 是正常的:https://github.com/Miaamen/uni-demo/tree/main/my-alpha-project

@fxy060608 fxy060608 self-assigned this Oct 8, 2022
@fxy060608 fxy060608 added bug Something isn't working vue3 mp-baidu 百度小程序 labels Oct 8, 2022
fxy060608 added a commit that referenced this issue Oct 8, 2022
@beginneryang
Copy link

可以正常评论但是无法获取到组件的事件回调参数
比如clickComment事件回调是个空obj (此回调应该写到srid参数的)

@Miaamen
Copy link
Author

Miaamen commented Nov 5, 2022

可以正常评论但是无法获取到组件的事件回调参数 比如clickComment事件回调是个空obj (此回调应该写到srid参数的)

请问这个问题解决了吗?问题关闭了?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mp-baidu 百度小程序 vue3
Projects
None yet
Development

No branches or pull requests

4 participants