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

test(unit): input: add input test #1764

Merged
merged 6 commits into from
Sep 30, 2022

Conversation

LadyChatterleyLover
Copy link
Contributor

@LadyChatterleyLover LadyChatterleyLover commented Sep 28, 2022

input: add input test

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

#768

💡 需求背景和解决方案

新增组件单元测试

📝 更新日志

  • test(Input): 补充 input 单元测试

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

input: add input test
@github-actions
Copy link
Contributor

github-actions bot commented Sep 28, 2022

完成

@PengYYYYY
Copy link
Collaborator

PengYYYYY commented Sep 28, 2022

reabse 一下 developvue 发了一个 3.2.40 的版本,server-render 下面输出的 html 中,svg 中的 viewbox 变更到 viewBoxdevelop 分支中已修复

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Sep 28, 2022 via email

@PengYYYYY PengYYYYY mentioned this pull request Sep 29, 2022
64 tasks
@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Sep 29, 2022 via email

@PengYYYYY
Copy link
Collaborator

maxcharacter 那里没有用String处理,不用转换

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年9月29日(星期四) 下午2:06 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [Tencent/tdesign-vue-next] test(unit): input: add input test (PR #1764) @PengYYYYY commented on this pull request. In src/input/useInput.ts: > - const stringInfo = getCharacterLength(val, props.maxcharacter); - if (typeof stringInfo === 'object') { - if (!props.allowInputOverMax) { - val = stringInfo.characters; - } - limitNumber.value = ${stringInfo.length}/${props.maxcharacter}; - } - } - if (props.maxlength && props.maxlength > 0) { - if (!props.allowInputOverMax) { - val = val.substring(0, props.maxlength); - } - limitNumber.value = ${val.length}/${props.maxlength}; - } + const val = (target as HTMLInputElement).value; + // if (props.maxcharacter && props.maxcharacter > 0) { 这一段 对maxcharacter 直接删掉吗? — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

代码不用注释了,没用的话直接删掉

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Sep 29, 2022 via email

@LadyChatterleyLover
Copy link
Contributor Author

LadyChatterleyLover commented Sep 29, 2022

@PengYYYYY 已经修改了哈,保证测试通过

@PengYYYYY PengYYYYY merged commit a54396c into Tencent:develop Sep 30, 2022
@github-actions github-actions bot mentioned this pull request Oct 9, 2022
15 tasks
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

Successfully merging this pull request may close these issues.

2 participants