Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

fix: 修复原生组件驼峰风格,React风格函数属性转换错误的问题 #358

Merged
merged 1 commit into from
Nov 16, 2019

Conversation

Darmody
Copy link
Contributor

@Darmody Darmody commented Nov 15, 2019

fix #357

@Darmody Darmody requested a review from yesmeck November 15, 2019 10:40
@vercel
Copy link

vercel bot commented Nov 15, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/yesmeck/remax/7b0l3exes
🌍 Preview: https://remax-git-fix-native-component-props.yesmeck.now.sh

import { isHostComponent as isAlipayHostComponent } from './adapters/alipay/components/factory';
import { isHostComponent as isToutiaoHostComponent } from './adapters/toutiao/components/factory';

export function isHostComponent(name: string) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#324 中对 factory 做了统一,那个PR里面再对这个方法优化。

@yesmeck
Copy link
Member

yesmeck commented Nov 15, 2019

加个测试

@Darmody
Copy link
Contributor Author

Darmody commented Nov 15, 2019

@yesmeck 也许我们该引导开发者使用原生的属性命名规范了

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 15, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 2cd2bef:

Sandbox Source
heuristic-booth-w1n2x Configuration

@Darmody
Copy link
Contributor Author

Darmody commented Nov 15, 2019

加个测试

嗯,我先看看CI

@yesmeck
Copy link
Member

yesmeck commented Nov 15, 2019

@yesmeck 也许我们该引导开发者使用原生的属性命名规范了

啥意思

@Darmody
Copy link
Contributor Author

Darmody commented Nov 15, 2019

@yesmeck 也许我们该引导开发者使用原生的属性命名规范了

啥意思

就是不用 react 风格了,直接 bindtap foo-bar 使用小程序原本文档的风格

@yesmeck
Copy link
Member

yesmeck commented Nov 15, 2019

好处是啥

@codecov
Copy link

codecov bot commented Nov 15, 2019

Codecov Report

Merging #358 into master will increase coverage by 1.53%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #358      +/-   ##
==========================================
+ Coverage   90.46%   91.99%   +1.53%     
==========================================
  Files         174      180       +6     
  Lines        2213     2549     +336     
  Branches      296      303       +7     
==========================================
+ Hits         2002     2345     +343     
+ Misses        210      203       -7     
  Partials        1        1
Impacted Files Coverage Δ
packages/remax/src/VNode.ts 100% <ø> (ø) ⬆️
...es/remax/src/adapters/wechat/components/factory.ts 100% <100%> (ø)
...ges/remax/src/adapters/wechat/components/Input.tsx 96.29% <100%> (+0.29%) ⬆️
...es/remax/src/adapters/wechat/components/Swiper.tsx 75% <100%> (+3.57%) ⬆️
packages/remax/src/propsAlias.ts 100% <100%> (ø) ⬆️
...s/remax/src/adapters/toutiao/components/factory.ts 80% <100%> (ø)
...es/remax/src/adapters/alipay/components/factory.ts 100% <100%> (ø) ⬆️
packages/remax/src/Container.ts 92.15% <100%> (+1.96%) ⬆️
.../remax/src/adapters/wechat/components/Textarea.tsx 96.29% <100%> (+0.29%) ⬆️
...ges/remax/src/adapters/wechat/components/Video.tsx 100% <100%> (ø) ⬆️
... and 11 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7cbd3c5...2cd2bef. Read the comment docs.

@Darmody
Copy link
Contributor Author

Darmody commented Nov 15, 2019

使用自定义组件是原生规范,host组件是 react 规范,有点割裂

@yesmeck
Copy link
Member

yesmeck commented Nov 15, 2019

还行吧

@vercel vercel bot temporarily deployed to staging November 15, 2019 11:11 Inactive
@vercel vercel bot requested a deployment to staging November 15, 2019 11:45 Abandoned
@yesmeck
Copy link
Member

yesmeck commented Nov 16, 2019

加个 render 自定义组件出来的 VNode 的测试。

@Darmody
Copy link
Contributor Author

Darmody commented Nov 16, 2019

加个 render 自定义组件出来的 VNode 的测试。

🚀

@yesmeck
Copy link
Member

yesmeck commented Nov 16, 2019

🐂🍺覆盖率涨了不少

@yesmeck yesmeck merged commit 5a789fc into master Nov 16, 2019
@yesmeck yesmeck deleted the fix/native-component-props branch November 16, 2019 14:52
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]小程序组件属性错误
2 participants