Browse Source

【issues/6957】editableCell组件值长度为0,无法编辑

JEECG 8 months ago
parent
commit
1c9e76931f

+ 3 - 1
jeecgboot-vue3/src/components/Table/src/components/editable/EditableCell.vue

@@ -2,9 +2,11 @@
   <div :class="prefixCls">
     <div v-show="!isEdit" :class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }" @click="handleEdit">
       <div class="cell-content" :title="column.ellipsis ? getValues ?? '' : ''">
+        <!-- update-begin--author:liaozhiyang---date:20240731---for:【issues/6957】editableCell组件值长度为0,无法编辑 -->
         <!-- update-begin--author:liaozhiyang---date:20240709---for:【issues/6851】editableCell组件值为0时不展示 -->
-        {{ getValues ?? '&nbsp;' }}
+        {{ typeof getValues === 'string' && getValues.length === 0 ? '&nbsp;' : getValues ?? '&nbsp;' }}
         <!-- update-end--author:liaozhiyang---date:20240709---for:【issues/6851】editableCell组件值为0时不展示 -->
+        <!-- update-end--author:liaozhiyang---date:20240731---for:【issues/6957】editableCell组件值长度为0,无法编辑 -->
       </div>
       <FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" />
     </div>