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

打包微信小程序 slot 插槽打包问题 #4203

Closed
monkeying-boy opened this issue Mar 16, 2023 · 5 comments
Closed

打包微信小程序 slot 插槽打包问题 #4203

monkeying-boy opened this issue Mar 16, 2023 · 5 comments

Comments

@monkeying-boy
Copy link

问题描述
[问题描述:尽可能简洁清晰地把问题描述清楚]
uni-app 使用 slot 插槽,打包成微信小程序后没有正确渲染。

在 h5 环境中渲染结果正常
image

在 微信小程序中渲染结果为空
image

复现步骤
[复现问题的步骤]
git clone https://github.com/monkeying-boy/uni-app-slot.git

  1. 启动 yarn dev:mp-weixin

[或者可以直接贴源代码]

预期结果
期望和h5 表现一致

补充信息
[可选]
看 微信小程序开发者工具上面的 xml 感觉像是没有正确加载组件。

@monkeying-boy
Copy link
Author

复现 demo uni-app-slot.zip

@monkeying-boy monkeying-boy reopened this Mar 16, 2023
@zhetengbiji
Copy link
Collaborator

image
这样的效果是否符合预期,如果符合,请等待下次更新:#3503

@monkeying-boy
Copy link
Author

image 这样的效果是否符合预期,如果符合,请等待下次更新:#3503

符合预期。麻烦再确认一下如果进行多层 slot 传递是否会出现微信小程序组件打包异常

@zhetengbiji
Copy link
Collaborator

#3503 中提到的问题和多层 slot 无关,是微信小程序不支持同一个 slot 渲染多个实例。

多层 slot 的问题可能需要另外讨论。

@zhetengbiji
Copy link
Collaborator

#3503 (comment)

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

2 participants