mirror of
https://gitee.com/bootx/dax-pay-ui.git
synced 2025-09-05 19:58:20 +00:00
fix(table): 0
is not shown in editable cell
修复可编辑单元格中未能正确显示零值的问题 fixed: #1039
This commit is contained in:
@@ -1,7 +1,9 @@
|
|||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- **Cropper** 修复未能及时销毁的问题
|
- **Cropper** 修复未能及时销毁的问题
|
||||||
- **BasicTable** 修复`CellFormat`无法使用`Map`类型数据的问题
|
- **BasicTable**
|
||||||
|
- 修复`CellFormat`无法使用`Map`类型数据的问题
|
||||||
|
- 修复可编辑单元格未能正确显示`0`值的问题
|
||||||
- **Qrcode** 修复二维码组件在创建时未能及时绘制的问题
|
- **Qrcode** 修复二维码组件在创建时未能及时绘制的问题
|
||||||
|
|
||||||
## 2.7.0(2021-08-03)
|
## 2.7.0(2021-08-03)
|
||||||
|
@@ -5,8 +5,8 @@
|
|||||||
:class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }"
|
:class="{ [`${prefixCls}__normal`]: true, 'ellipsis-cell': column.ellipsis }"
|
||||||
@click="handleEdit"
|
@click="handleEdit"
|
||||||
>
|
>
|
||||||
<div class="cell-content" :title="column.ellipsis ? getValues || '' : ''">{{
|
<div class="cell-content" :title="column.ellipsis ? getValues ?? '' : ''">{{
|
||||||
getValues || ' '
|
getValues ?? ' '
|
||||||
}}</div>
|
}}</div>
|
||||||
<FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" />
|
<FormOutlined :class="`${prefixCls}__normal-icon`" v-if="!column.editRow" />
|
||||||
</div>
|
</div>
|
||||||
@@ -35,11 +35,10 @@
|
|||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { CSSProperties, PropType } from 'vue';
|
import type { CSSProperties, PropType } from 'vue';
|
||||||
|
import { computed, defineComponent, nextTick, ref, toRaw, unref, watchEffect } from 'vue';
|
||||||
import type { BasicColumn } from '../../types/table';
|
import type { BasicColumn } from '../../types/table';
|
||||||
import type { EditRecordRow } from './index';
|
import type { EditRecordRow } from './index';
|
||||||
|
import { CheckOutlined, CloseOutlined, FormOutlined } from '@ant-design/icons-vue';
|
||||||
import { defineComponent, ref, unref, nextTick, computed, watchEffect, toRaw } from 'vue';
|
|
||||||
import { FormOutlined, CloseOutlined, CheckOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { CellComponent } from './CellComponent';
|
import { CellComponent } from './CellComponent';
|
||||||
|
|
||||||
import { useDesign } from '/@/hooks/web/useDesign';
|
import { useDesign } from '/@/hooks/web/useDesign';
|
||||||
@@ -48,9 +47,9 @@
|
|||||||
import clickOutside from '/@/directives/clickOutside';
|
import clickOutside from '/@/directives/clickOutside';
|
||||||
|
|
||||||
import { propTypes } from '/@/utils/propTypes';
|
import { propTypes } from '/@/utils/propTypes';
|
||||||
import { isString, isBoolean, isFunction, isNumber, isArray } from '/@/utils/is';
|
import { isArray, isBoolean, isFunction, isNumber, isString } from '/@/utils/is';
|
||||||
import { createPlaceholderMessage } from './helper';
|
import { createPlaceholderMessage } from './helper';
|
||||||
import { set, omit } from 'lodash-es';
|
import { omit, set } from 'lodash-es';
|
||||||
import { treeToList } from '/@/utils/helper/treeHelper';
|
import { treeToList } from '/@/utils/helper/treeHelper';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -214,8 +213,7 @@
|
|||||||
if (isBoolean(editRule) && !currentValue && !isNumber(currentValue)) {
|
if (isBoolean(editRule) && !currentValue && !isNumber(currentValue)) {
|
||||||
ruleVisible.value = true;
|
ruleVisible.value = true;
|
||||||
const component = unref(getComponent);
|
const component = unref(getComponent);
|
||||||
const message = createPlaceholderMessage(component);
|
ruleMessage.value = createPlaceholderMessage(component);
|
||||||
ruleMessage.value = message;
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (isFunction(editRule)) {
|
if (isFunction(editRule)) {
|
||||||
|
Reference in New Issue
Block a user