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

chore: Input mini #1137

Merged
merged 26 commits into from
Nov 17, 2023
Merged

chore: Input mini #1137

merged 26 commits into from
Nov 17, 2023

Conversation

Yang03
Copy link
Contributor

@Yang03 Yang03 commented Aug 24, 2023

先看下API 设计,input type 添加一个 textArea,因为小程序不支持rows 属性, 如果用rows 属性判断是否是textArea ,但是rows 不起作用,会有歧义, 另外 input 小程序 没有 ref 的 focus, 因为没有小程序ref 获得不是dom 对象.

@vercel
Copy link

vercel bot commented Aug 24, 2023

Someone is attempting to deploy a commit to the ZhongAnTech Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions
Copy link

github-actions bot commented Aug 24, 2023

😭 Deploy PR Preview failed.

@codecov
Copy link

codecov bot commented Aug 24, 2023

Codecov Report

Attention: 61 lines in your changes are missing coverage. Please review.

Comparison is base (8a451e1) 86.11% compared to head (7a21f08) 85.18%.

❗ Current head 7a21f08 differs from pull request most recent head df6a571. Consider uploading reports for the commit df6a571 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1137      +/-   ##
==========================================
- Coverage   86.11%   85.18%   -0.93%     
==========================================
  Files         244      247       +3     
  Lines        5559     5622      +63     
  Branches     1315     1342      +27     
==========================================
+ Hits         4787     4789       +2     
- Misses        766      827      +61     
  Partials        6        6              
Files Coverage Δ
packages/zarm/src/input/Input.tsx 89.85% <100.00%> (-0.29%) ⬇️
packages/zarm/src/input/index.ts 100.00% <ø> (ø)
packages/zarm/src/input/utils/index.ts 100.00% <100.00%> (ø)
...src/utils/hooks/useControllableEventValue/index.ts 96.42% <100.00%> (+0.13%) ⬆️
packages/zarm/src/input/index.mini.ts 0.00% <0.00%> (ø)
packages/zarm/src/input/Input.mini.tsx 0.00% <0.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vercel
Copy link

vercel bot commented Aug 29, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
zarm ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 10, 2023 6:31am

const {
type,
disabled,
autoFocus,
Copy link
Collaborator

Choose a reason for hiding this comment

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

原生的 autoFocus 属性即将过期,做个映射吧


export type InputBaseProps = InputTextProps | InputTextareaProps;

const baseSize = 22;
Copy link
Collaborator

Choose a reason for hiding this comment

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

这里能不写死吗?和css变量结合

@JeromeLin
Copy link
Collaborator

  1. 禁用和只读的字体颜色不对
    bad
    wecom-temp-201774-3f098deb6d4228f6f34ca50b87bcf3a3

good
wecom-temp-187954-fa9f2ca19658cb4dfa09c8007ab2040b

  1. 禁用和只读对下面留白空间的处理是不一样的,只读是文本展示,根据文字自适应高度;禁用是输入框,输入区域需要留白

  2. 上下边距相等,展示的行数根据rows来定
    bad
    企业微信截图_d9240364-6d06-4932-88b6-659b161facee

good
企业微信截图_de78a3e7-3493-4a66-803e-65677fae7561

@JeromeLin JeromeLin merged commit 6773de0 into ZhongAnTech:next Nov 17, 2023
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants