Skip to content

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

Open
@CoderSerio

Description

@CoderSerio

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>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions