NEZ-2734 fix: 解决表格描述列表单词换行截断问题

This commit is contained in:
likexuan
2023-03-27 16:04:50 +08:00
parent 88e5a0eac9
commit 3e85fbde03
18 changed files with 26 additions and 21 deletions

View File

@@ -597,3 +597,10 @@
line-height: 1; line-height: 1;
height: 16px; height: 16px;
} }
.nz-table-list .el-table__body{
.el-table-remark{
word-wrap: break-word;
word-break: keep-all
}
}

View File

@@ -469,6 +469,7 @@ td.el-table__expanded-cell:hover {
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 14px; font-size: 14px;
margin-left: 3px;
} }
} }
} }

View File

@@ -213,6 +213,7 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: 14px; font-size: 14px;
margin-left: 3px;
} }
} }
} }

View File

@@ -51,11 +51,7 @@
</div> </div>
</template> </template>
<template v-else-if="item.prop === 'description'"> <template v-else-if="item.prop === 'description'">
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template> <span v-if="scope.row[item.prop]" class="el-table-remark">{{scope.row[item.prop]}}</span>
<span v-else>-</span>
</template>
<template v-else-if="item.prop === 'remark'">
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
<span v-else-if="item.prop === 'severityId'&&scope.row['severity']" class="severity"> <span v-else-if="item.prop === 'severityId'&&scope.row['severity']" class="severity">

View File

@@ -103,7 +103,7 @@
</template> </template>
</copy> </copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{ <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{
scope.row[item.prop] || "-" scope.row[item.prop] || "-"
}}</span> }}</span>
<template v-else>-</template> <template v-else>-</template>

View File

@@ -22,7 +22,7 @@
:key="`col-${index}`" :key="`col-${index}`"
:label="item.label"> :label="item.label">
<template slot-scope="scope" :column="item"> <template slot-scope="scope" :column="item">
<template v-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template> <span v-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -61,9 +61,9 @@
<template v-else>-</template> <template v-else>-</template>
</template> </template>
<template v-if="item.prop === 'remark'"> <template v-if="item.prop === 'remark'">
<template v-if="scope.row.remark"> <span v-if="scope.row.remark" class="el-table-remark">
{{scope.row.remark}} {{scope.row.remark}}
</template> </span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</template> </template>

View File

@@ -48,7 +48,7 @@
</template> </template>
</copy> </copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -49,7 +49,7 @@
</template> </template>
</copy> </copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop] || '-'}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop] || '-'}}</span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -49,7 +49,7 @@
{{ 'Used' }} {{ 'Used' }}
</div> </div>
</template> </template>
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -53,7 +53,7 @@
</template> </template>
</copy> </copy>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -78,7 +78,7 @@
</div> </div>
</template> </template>
<span v-else-if="item.prop === 'updateAt'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span> <span v-else-if="item.prop === 'updateAt'">{{utcTimeToTimezoneStr(scope.row[item.prop])}}</span>
<template v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</template> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<template v-else>-</template> <template v-else>-</template>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -74,7 +74,7 @@
{{scope.row[item.prop]}} {{scope.row[item.prop]}}
</span> </span>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -80,7 +80,7 @@
{{scope.row.dashboard ? scope.row.dashboard.name : '-'}} {{scope.row.dashboard ? scope.row.dashboard.name : '-'}}
</template> </template>
<span v-else-if="item.prop === 'id'" :id="'globalSearch' + scope.row.id">{{scope.row[item.prop]}}</span> <span v-else-if="item.prop === 'id'" :id="'globalSearch' + scope.row.id">{{scope.row[item.prop]}}</span>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -87,7 +87,7 @@
</template> </template>
<template v-else-if="item.prop === 'remark'"> <template v-else-if="item.prop === 'remark'">
<template>{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</template> <span class="el-table-remark">{{scope.row[item.prop] ? scope.row[item.prop] : '-'}}</span>
</template> </template>
<template v-else-if="item.prop === 'state'"> <template v-else-if="item.prop === 'state'">
<div v-if="scope.row[item.prop] == '1'"> <div v-if="scope.row[item.prop] == '1'">

View File

@@ -51,7 +51,7 @@
</copy> </copy>
</template> </template>
</template> </template>
<span v-else-if="scope.row[item.prop]">{{scope.row[item.prop]}}</span> <span v-else-if="scope.row[item.prop]" :class="item.prop === 'remark'? 'el-table-remark':''">{{scope.row[item.prop]}}</span>
<span v-else>-</span> <span v-else>-</span>
</template> </template>
</el-table-column> </el-table-column>

View File

@@ -126,7 +126,7 @@
</div> </div>
<div class="mib-browser-detail-row"> <div class="mib-browser-detail-row">
<div>Description</div> <div>Description</div>
<div>{{currentWalk.description}}</div> <div class="el-table-remark">{{currentWalk.description}}</div>
</div> </div>
</div> </div>
</div> </div>

View File

@@ -52,9 +52,9 @@
<template v-if="item.prop == 'createAt'"> <template v-if="item.prop == 'createAt'">
{{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}} {{scope.row[item.prop]?utcTimeToTimezoneStr(scope.row[item.prop]):'-'}}
</template> </template>
<template v-if="item.prop == 'remark'"> <span v-if="item.prop == 'remark'" class="el-table-remark">
{{scope.row[item.prop]?scope.row[item.prop]:'-'}} {{scope.row[item.prop]?scope.row[item.prop]:'-'}}
</template> </span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column