前端模板修改,table识别图片类型显示为图片而非链接,识别textarea和富文本设置超过三行隐藏

This commit is contained in:
抓蛙师 2021-09-08 18:13:08 +08:00
parent 3b5fb07c3d
commit 67a146d30c
3 changed files with 32 additions and 0 deletions

View File

@ -105,6 +105,18 @@
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<el-image :src="scope.row.${javaField}" v-if="scope.row.${javaField}" style="width: 60px;height: 60px"/>
</template>
</el-table-column>
#elseif($column.list && ($column.htmlType == "editor" || $column.htmlType == "textarea"))
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<span class="line3">{{ scope.row.${javaField}}}</span>
</template>
</el-table-column>
#elseif($column.list && $column.dictType && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}">
<template slot-scope="scope">

View File

@ -134,6 +134,18 @@
<span>{{ parseTime(scope.row.${javaField}, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
#elseif($column.list && $column.htmlType == "imageUpload")
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<el-image :src="scope.row.${javaField}" v-if="scope.row.${javaField}" style="width: 60px;height: 60px"/>
</template>
</el-table-column>
#elseif($column.list && ($column.htmlType == "editor" || $column.htmlType == "textarea"))
<el-table-column label="${comment}" align="center" prop="${javaField}" width="180">
<template slot-scope="scope">
<span class="line3">{{ scope.row.${javaField}}}</span>
</template>
</el-table-column>
#elseif($column.list && $column.dictType && "" != $column.dictType)
<el-table-column label="${comment}" align="center" prop="${javaField}">
<template slot-scope="scope">

View File

@ -60,6 +60,14 @@
color: inherit;
}
/*超过三行隐藏*/
.line3{
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
.el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important;
}