Skip to content

Conversation

YuShengHou
Copy link

@YuShengHou YuShengHou commented Aug 15, 2025

🤔 这个 PR 的性质是?

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

🔗 相关 Issue

Tencent/tdesign-vue-next#5871 (comment)

💡 需求背景和解决方案

获得浏览器名称和版本

image

📝 更新日志

feat(helper): 新增工具函数 detectBrowser,获得浏览器名称和版本

  • 本条 PR 不需要纳入 Changelog

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

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

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

@uyarn uyarn requested a review from Copilot August 20, 2025 08:53
@tdesign-bot
Copy link
Collaborator

tdesign-bot commented Aug 20, 2025

TDesign Component Repositories CI Test Open

Component Lint Test Build Preview
tdesign-vue 👀
tdesign-vue-next 👀
tdesign-react 👀
tdesign-web-components
tdesign-mobile-vue 👀
tdesign-mobile-react 👀

Copy link

@Copilot 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 adds a new utility function detectBrowser to the helper module that detects the current browser name and version by parsing the user agent string.

  • Adds detectBrowser() function that returns browser name and major version number
  • Implements browser detection for Chrome, Safari, Firefox, Edge, and Opera
  • Includes proper error handling for environments without navigator support

Tip: Customize your code reviews with copilot-instructions.md. Create the file or 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.

3 participants