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

u-textarea字数统计不限制时,会出现/-1 #1073

Open
Source-Roc opened this issue Jul 4, 2024 · 0 comments
Open

u-textarea字数统计不限制时,会出现/-1 #1073

Source-Roc opened this issue Jul 4, 2024 · 0 comments

Comments

@Source-Roc
Copy link

这个功能解决了什么问题?

当设置为:count = "true" maxlength = "-1" (即不限制字符数量是)时优化先显示字数统计
例如(写了30字符):
应该显示:30,
现在实际显示:30/-1

你期望的 API 是怎样的?

    <text
        class="u-textarea__count"
        :style="{
            'background-color': disabled ? 'transparent' : '#fff',
        }"
        v-if="count && maxlength !== -1"
        >{{ innerValue.length }}/{{ maxlength }}</text
    >
    <text
        class="u-textarea__count"
        :style="{
              'background-color': disabled ? 'transparent' : '#fff',
          }"
        v-if="count && maxlength === -1"
        >{{ innerValue.length }}</text
    >
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

No branches or pull requests

1 participant