Skip to content

feat(input): add input component and its examples#78

Merged
carolin913 merged 11 commits into
TDesignOteam:mainfrom
HOWARD-WANG-323:feat/input
Jul 15, 2024
Merged

feat(input): add input component and its examples#78
carolin913 merged 11 commits into
TDesignOteam:mainfrom
HOWARD-WANG-323:feat/input

Conversation

@HOWARD-WANG-323
Copy link
Copy Markdown
Contributor

@HOWARD-WANG-323 HOWARD-WANG-323 commented Jul 8, 2024

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#25

💡 需求背景和解决方案

📝 更新日志

添加input组件和input组件相关示例(addon组件未实现)

  • fix(组件名称): 处理问题或特性描述 ...

  • 本条 PR 不需要纳入 Changelog

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

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

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

Comment thread src/input/input.tsx Outdated
Comment thread src/input/input.tsx
Comment thread src/input/input.tsx Outdated
Comment thread src/input/input.tsx Outdated
Comment thread src/input/input.tsx Outdated
Comment thread src/input/input-group.tsx Outdated
Comment thread src/input/input-group.tsx
Comment thread src/input/useLengthLimit.ts Outdated
@duenyang duenyang self-requested a review July 10, 2024 08:36
Comment thread src/input/input.tsx Outdated
Comment thread src/input/input.tsx
Comment thread src/input/input.tsx
},
className,
)}
ref={this.wrapperRef}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

fetch完最新的main代码后,所有的ref需要放到属性的最后面,避免omi最新版获取不到ref的问题

<div ...其它的属性在前 ref=XXX>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

其它地方也一样,不再评论

Comment thread src/input/input.tsx Outdated
disabled,
status,
size,
class: className,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

props应该为className不是class

Comment thread src/input/input.tsx Outdated
Comment thread src/input/input.tsx Outdated
Comment thread src/input/input-group.tsx Outdated
@duenyang duenyang self-requested a review July 12, 2024 08:31
Comment thread src/input/input.tsx Outdated
}

function handleClear(e: MouseEvent) {
console.log('clear');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

删掉调试的console

Comment thread src/input/input.tsx Outdated
</div>
);

function handleChange(e) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这些事件的处理函数不要都放到render里面,单独在外面定义private方法

@carolin913 carolin913 merged commit d100973 into TDesignOteam:main Jul 15, 2024
This was referenced Oct 17, 2024
This was referenced Dec 16, 2024
Comment thread src/input/input.tsx
return result ? (
<span class={classname(`${classPrefix}-input__${type} ${iconClassName}`)}>{result}</span>
) : (
<span></span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

这个空 span 有什么含义吗 🤔
今天在看 DOM 结构的时候发现了这个

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.

4 participants