Tencent / Tencent/tdesign-react

[Input] 希望能支持自定义字符统计

Open
#2,921 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

💪🏻 enhancement 💭 discussion
Dominant language
TypeScript
Stars
965
Forks
373
Avg merge
3d 6h
Merged PRs (30d)
17

Description

这个功能解决了什么问题

现在默认支持的字符统计方式太局限了,可能业务需要:两个英文字符算一个计数长度,一个中文算一个计数长度,或者表情算两个计数长度等等

你建议的方案是什么

能否提供自定义字符统计

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Input component and review how its current character-count behavior is exposed. Define the configurable counting behavior for English characters, Chinese characters, and emoji, then verify that the resulting API and examples cover those cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.