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

redux 经过 connect 注入变量 到页面组件,props 中声明导致 调用页面组件需要传递参数 #582

Closed
Onlylonger opened this issue Sep 7, 2018 · 3 comments

Comments

@Onlylonger
Copy link

redux 经过 connect 注入变量 到页面组件,props 中声明导致 调用页面组件需要传递 注入的变量

image

image

image

请求解决方案

github 复现地址:https://github.com/Onlylonger/taro-tmp

@ypli0629
Copy link

ypli0629 commented Sep 7, 2018

// #region 书写注意
//
// 目前 typescript 版本还无法在装饰器模式下将 Props 注入到 Taro.Component 中的 props 属性
// 需要显示声明 connect 的参数类型并通过 interface 的方式指定 Taro.Component 子类的 props
// 这样才能完成类型检查和 IDE 的自动提示
// 使用函数模式则无此限制
// ref: DefinitelyTyped/DefinitelyTyped#20796
//
// #endregion

@ypli0629
Copy link

ypli0629 commented Sep 7, 2018

老哥,例子里面有说明的

@Onlylonger
Copy link
Author

Onlylonger commented Sep 7, 2018

嗯,忽略了。

我这边自己改了下

heweishui pushed a commit to heweishui/taro that referenced this issue Jun 5, 2024
fix: 修复启动时如果传参则query参数会丢失
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