Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Feature]: Textarea 字数统计自定义渲染插槽 #1892

Open
CoderSerio opened this issue Jun 18, 2024 · 0 comments
Open

✨ [Feature]: Textarea 字数统计自定义渲染插槽 #1892

CoderSerio opened this issue Jun 18, 2024 · 0 comments
Labels
enhancement Feature enhancement

Comments

@CoderSerio
Copy link

What problem does this feature solve

现状

目前 Textarea 组件是有两个 API show-countmaxlength 用于控制渲染右下角的字数统计,不够灵活。
image

补充

如果这里确认需要修改的话,希望作为 good first issue

What does the proposed API look like

改进思路

是否可以考虑新增字数渲染的自定义插槽,并提供输入的文本内容的上下文。
这样做不仅带来了更灵活的自定义渲染,还提供了更多功能拓展——比如用户对内容进行校验后,可以在右下角渲染对应的提示。

API 形式

插槽,形如:

<template #counter #text="{data}">自定义渲染的字数统计</template>
@fu050409 fu050409 added the enhancement Feature enhancement label Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature enhancement
Projects
None yet
Development

No branches or pull requests

2 participants