Skip to content

Commit b56cf5b

Browse files
committed
feat(ui): CI - update default style of attr(JSON type)
1 parent 53e8d34 commit b56cf5b

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

cmdb-ui/src/modules/cmdb/views/ci/modules/ciDetailAttrContent.vue

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,14 @@
1717
:ci_id="ci._id"
1818
:attr_id="attr.id"
1919
></PasswordField>
20-
<template v-else-if="attr.value_type === '6'">{{ JSON.stringify(ci[attr.name] || {}) }}</template>
20+
<a-tooltip
21+
v-else-if="attr.value_type === '6'"
22+
:title="JSON.stringify(ci[attr.name] || {})"
23+
>
24+
<span class="ci-detail-attr-json">
25+
{{ JSON.stringify(ci[attr.name] || {}) }}
26+
</span>
27+
</a-tooltip>
2128
<template v-else-if="attr.is_choice">
2229
<template v-if="attr.is_list">
2330
<span
@@ -348,4 +355,12 @@ export default {
348355
}
349356
</script>
350357
351-
<style></style>
358+
<style lang="less" scoped>
359+
.ci-detail-attr-json {
360+
overflow: hidden;
361+
text-overflow: ellipsis;
362+
display: -webkit-box;
363+
-webkit-line-clamp: 3;
364+
-webkit-box-orient: vertical;
365+
}
366+
</style>

0 commit comments

Comments
 (0)