fix(BaTable):修复单元格 tag 渲染器值为 0 时不渲染的问题

This commit is contained in:
妙码生花 2024-10-27 10:44:40 +08:00
parent 16a1a5b84e
commit 7abe284445
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<template>
<div>
<el-tag v-if="cellValue != ''" :type="getTagType(cellValue, field.custom)" :effect="field.effect ?? 'light'" :size="field.size ?? 'default'">
<el-tag v-if="cellValue !== ''" :type="getTagType(cellValue, field.custom)" :effect="field.effect ?? 'light'" :size="field.size ?? 'default'">
{{ !isEmpty(field.replaceValue) ? field.replaceValue[cellValue] ?? cellValue : cellValue }}
</el-tag>
</div>

View File

@ -3,7 +3,7 @@
<template v-if="isArray(cellValue)">
<template v-for="(tag, idx) in cellValue" :key="idx">
<el-tag
v-if="tag != ''"
v-if="tag !== ''"
class="m-4"
:type="getTagType(tag, field.custom)"
:effect="field.effect ?? 'light'"
@ -15,7 +15,7 @@
</template>
<template v-else>
<el-tag
v-if="cellValue != ''"
v-if="cellValue !== ''"
:type="getTagType(cellValue, field.custom)"
:effect="field.effect ?? 'light'"
:size="field.size ?? 'default'"