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

【微信小程序 Vue3】作用域插槽props丢失 #5327

Closed
CX3201 opened this issue Mar 4, 2025 · 1 comment
Closed

【微信小程序 Vue3】作用域插槽props丢失 #5327

CX3201 opened this issue Mar 4, 2025 · 1 comment
Assignees
Labels
bug Something isn't working mp-weixin 微信小程序

Comments

@CX3201
Copy link

CX3201 commented Mar 4, 2025

发行方式

小程序

具体平台

微信小程序

开发环境

None

项目创建方式

None

依赖版本

3.0.0-4020920240930001

问题描述

作用域插槽+分包组件,setup时prop是undefined
原因分析:插槽渲染数据保存在propsCaches中,如果在attach前父组件重新渲染,propsCaches会清空,导致插槽访问不到之前的props

重现步骤

见附件demo

my-vue3-project.zip

期望行为

显示正常传入

实际行为

显示异常传入

截图或录屏

No response

@CX3201 CX3201 added the bug Something isn't working label Mar 4, 2025
@CX3201 CX3201 changed the title 【微证券小程序】作用域插槽props丢失 【微信小程序】作用域插槽props丢失 Mar 4, 2025
@CX3201 CX3201 changed the title 【微信小程序】作用域插槽props丢失 【微信小程序 Vue3】作用域插槽props丢失 Mar 4, 2025
@Otto-J Otto-J self-assigned this Mar 4, 2025
@Otto-J Otto-J added the mp-weixin 微信小程序 label Mar 4, 2025
@Otto-J
Copy link
Member

Otto-J commented Mar 12, 2025

我运行了你提供的 demo,这个在 mp-weixin 上相当于主包中加载子包的页面作为组件,这个行为不支持。web 和app 中表现正常是,多端用法对齐的目的。

@Otto-J Otto-J closed this as not planned Won't fix, can't repro, duplicate, stale Mar 12, 2025
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-weixin 微信小程序
Projects
None yet
Development

No branches or pull requests

2 participants