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

EditableCell组件显示值问题,解决了0不显示问题导致长度为0的文本无法编辑 #6957

Closed
q060831 opened this issue Jul 24, 2024 · 2 comments

Comments

@q060831
Copy link

q060831 commented Jul 24, 2024

版本号:3.7.0

问题描述:
#6851
解决了0不展示问题,但是长度为0的字符串无法编辑的问题又出来的。
建议改成这样

  <div v-show="!isEdit" :class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }" @click="handleEdit">
      <div class="cell-content" :title="column.ellipsis ? getValues ?? '' : ''">
        {{ getValues || getValues === 0 ? getValues : '&nbsp;' }}
      </div>
      <FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" />
    </div>
@zhangdaiscott
Copy link
Member

zy

@liaozhiyang
Copy link
Contributor

已修复,下一版本发布。

按如下更改应该更妥当:
1.字符串可能有多个空格存在的情况
2.布尔false也能显示在界面

image
{{ typeof getValues === 'string' && getValues.length === 0 ? '&nbsp;' : getValues ?? '&nbsp;' }}

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

3 participants