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+TS 写小程序 淌水之路 #40

Open
lovelmh13 opened this issue Jun 22, 2020 · 0 comments
Open

Taro+TS 写小程序 淌水之路 #40

lovelmh13 opened this issue Jun 22, 2020 · 0 comments

Comments

@lovelmh13
Copy link
Owner

  1. components里面的组件声明,要用xxx.weapp.tsx结尾,不然编译不过去。改了名字以后,要重新启动npm run dev:weapp

  2. 小程序组件的slot插槽,用this.props.children代替。暂时不知道具名插槽怎么弄。而且这么用了以后,插槽里的标签是显示在原本写的父组件之外的。而且在我用Button组件的时候,props神明了openType却没有传递值,生成了两个插槽,而传递了openType以后正常了。但是依然插槽插进来的标签,显示在父组件之外
    image

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