Skip to content

Conversation

@engvuchen
Copy link
Contributor

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

#6170

💡 需求背景和解决方案

  1. table 文档未列出 pagination 传样式的最佳实践、pagination 定义也缺少 class;
  2. table pagination 是个对象,试了 class、className,class 是正常合并样式,className 是覆盖了 pagination 的样式;
  3. vue3 源码对 className,是直接设置到元素的 el.className;不会合并 class、className;

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

tdesign-vue-next

@tdesign-vue-next/chat

@tdesign-vue-next/auto-import-resolver

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

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

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

@tdesign-bot
Copy link
Collaborator

TDesign Component Site Preview Open

Component Preview
tdesign-vue-next 完成
@tdesign-vue-next/chat 完成

@pkg-pr-new
Copy link

pkg-pr-new bot commented Nov 20, 2025

tdesign-vue-next-demo

npm i https://pkg.pr.new/Tencent/tdesign-vue-next/@tdesign-vue-next/auto-import-resolver@6171
npm i https://pkg.pr.new/Tencent/tdesign-vue-next@6171
npm i https://pkg.pr.new/Tencent/tdesign-vue-next/@tdesign-vue-next/chat@6171

commit: bafb65f

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the Table component's pagination handling by adding support for the className prop. The issue was that when users tried to pass custom classes to the pagination component via the className property, it would override the default pagination styles instead of merging with them, as Vue 3 handles className differently from class.

Key Changes

  • Added conversion logic to transform className to class for proper class merging in Vue 3
  • Extended the type definition to accommodate both class and className properties

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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