Skip to content

Conversation

@LeonardoSya
Copy link
Collaborator

@LeonardoSya LeonardoSya commented Nov 24, 2025

💡 改动项

  1. 新增 t-selectt-option 组件和相关测试用例
  2. 修复 t-fake-arrow 这个收起/展开图标的样式问题,及下游组件 collapse 对它的调用方法
  3. 修复 loading 组件作为输入框后缀图标不能居中的问题
  4. 修复 popup 组件在 visible 时异常闪烁的问题
  5. 完善 DEVELOP_GUIDE.md 中的新增组件部分文档
  6. 添加 select, popup 的 setExportparts 功能
  7. input, panel 支持容器宽高监听能力,以实现 select 组件的弹窗宽度和定位跟随功能

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#11

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

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

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

@LeonardoSya LeonardoSya self-assigned this Nov 24, 2025
@LeonardoSya LeonardoSya added the enhancement New feature or request label Nov 24, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 24, 2025

完成

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 24, 2025

Open in StackBlitz

npm i https://pkg.pr.new/TDesignOteam/tdesign-web-components@328

commit: 97e0da0


install(): void {
window.addEventListener('resize', this.updatePopper);
if (this.triggerRef.current) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这段测试过生效么?按理说放到installed钩子里才能生效

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

270c206

昨晚推了一个feat: popup添加width监听能力 & 修复authWidth下web components的 宽度问题修改,尝试并验证了这些问题,但不知道为什么它们是同一个cr 但没有显示在 diff 里....

}
}

updateCommonInputProps() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个写法不太符合直觉,用计算属性更好一点
get commonInputProps() {
const { loading, suffixIcon } = this.props;
return {
...pick(this.props, COMMON_PROPERTIES),
suffixIcon: loading ? : suffixIcon,
};
}

export default class LoadingDemo extends Component {
options = [];

loading = false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

调用this.update()触发响应式不是推荐用法,可以参考下比较新的组件的示例,比如chat-sender里的例子。响应式属性应该用signal()包裹,类似react里的useState,就可以在更新时触发响应式渲染


import type { SelectContext, TdOptionProps } from '../type';

const currentValue = signal('');
Copy link
Collaborator

Choose a reason for hiding this comment

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

currentValue和currentOption放到SelectBase的成员变量里吧,标准一点

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants