fix: 参数配置dnnList列表超过4个省略显示

This commit is contained in:
TsMask
2024-02-02 17:12:50 +08:00
parent bf0d7267f0
commit 436cc3795e

View File

@@ -1417,7 +1417,7 @@ onMounted(() => {
{{ text.comment }}
</template>
<div class="editable-cell">
<template v-if="text.array">
<template v-if="text.array && Array.isArray(text.value)">
<a-button
type="default"
size="small"
@@ -1432,7 +1432,14 @@ onMounted(() => {
</a-button>
<!--特殊字段拓展显示-->
<span v-if="text.name === 'dnnList'">
({{ text.value?.map((s: any) => s.dnn).join() }})
({{
text.value.length > 4
? `${text.value
.slice(0, 3)
.map((s: any) => s.dnn)
.join()}...${text.value.length}`
: text.value.map((s: any) => s.dnn).join()
}})
</span>
</template>