fix: BUG修改
This commit is contained in:
parent
2908677015
commit
c9ff390443
@ -54,6 +54,11 @@
|
||||
v-if="item.type == 'selection' || item.type == 'index'"
|
||||
>
|
||||
</el-table-column>
|
||||
<!-- 富文本 -->
|
||||
<el-table-column v-bind="item" :align="item.align ?? 'center'" v-if="item.type == 'html'" v-slot="scope">
|
||||
<component :is="item.render" :row="scope.row" v-if="item.render"> </component>
|
||||
<slot :name="item.type" :row="scope.row" v-else></slot>
|
||||
</el-table-column>
|
||||
<!-- expand 支持 tsx 语法 && 作用域插槽 (tsx > slot) -->
|
||||
<el-table-column v-bind="item" :align="item.align ?? 'center'" v-if="item.type == 'expand'" v-slot="scope">
|
||||
<component :is="item.render" :row="scope.row" v-if="item.render"> </component>
|
||||
|
||||
@ -10,7 +10,7 @@ export interface EnumProps {
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export type TypeProp = "index" | "selection" | "expand";
|
||||
export type TypeProp = "index" | "selection" | "expand" | "html";
|
||||
|
||||
export type SearchType =
|
||||
| "input"
|
||||
|
||||
@ -18,3 +18,16 @@
|
||||
.content {
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
.html-div:first-child {
|
||||
display: block !important;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.html-div:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #html="{ row }">
|
||||
<div v-html="row.content" class="html-div"></div>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="onLook(row)">
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" />
|
||||
@ -139,7 +142,7 @@ const columns: ColumnProps[] = [
|
||||
|
||||
// 多级 prop
|
||||
{ prop: "title", label: "通知标题", search: { el: "input" } },
|
||||
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
||||
{ prop: "content", label: "通知内容", search: { el: "input" }, type: "html" },
|
||||
{ prop: "createTime", label: "发布时间" },
|
||||
{ prop: "operation", label: "操作", fixed: "right" }
|
||||
];
|
||||
|
||||
@ -15,3 +15,16 @@
|
||||
.content {
|
||||
padding: 0 40px;
|
||||
}
|
||||
|
||||
.html-div:first-child {
|
||||
display: block !important;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.html-div:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
background
|
||||
:isShowSearch="false"
|
||||
>
|
||||
<template #html="{ row }">
|
||||
<div v-html="row.content" class="html-div"></div>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="onLook(row)">
|
||||
<img src="@/assets/images/tableIcon/look.png" alt="" class="configureIcon" />
|
||||
@ -128,7 +131,7 @@ const columns: ColumnProps[] = [
|
||||
|
||||
// 多级 prop
|
||||
{ prop: "title", label: "通知标题", search: { el: "input" } },
|
||||
{ prop: "content", label: "通知内容", search: { el: "input" } },
|
||||
{ prop: "content", label: "通知内容", search: { el: "input" }, type: "html" },
|
||||
{ prop: "createByName", label: "发布人名称" },
|
||||
{ prop: "createTime", label: "发布时间" },
|
||||
{
|
||||
|
||||
@ -18,3 +18,16 @@
|
||||
.content :deep(.ql-align-left) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.html-div:first-child {
|
||||
display: block !important;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.html-div:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -12,6 +12,9 @@
|
||||
:isShowSearch="false"
|
||||
@row-click="rowClick"
|
||||
>
|
||||
<template #html="{ row }">
|
||||
<div v-html="row.content" class="html-div"></div>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="ondownLoad(row)">
|
||||
<img src="@/assets/images/tableIcon/下载附件.png" alt="" class="configureIcon" />
|
||||
|
||||
@ -18,3 +18,16 @@
|
||||
.content :deep(.ql-align-left) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.html-div:first-child {
|
||||
display: block !important;
|
||||
line-height: 50px;
|
||||
height: 50px;
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
.html-div:not(:first-child) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@ -11,6 +11,9 @@
|
||||
background
|
||||
@row-click="rowClick"
|
||||
>
|
||||
<template #html="{ row }">
|
||||
<div v-html="row.content" class="html-div"></div>
|
||||
</template>
|
||||
<template #operation="{ row }">
|
||||
<el-button type="primary" link @click="ondownLoad(row)">
|
||||
<img src="@/assets/images/tableIcon/下载附件.png" alt="" class="configureIcon" />
|
||||
@ -62,7 +65,7 @@ const columns: ColumnProps[] = [
|
||||
|
||||
// 多级 prop
|
||||
{ prop: "title", label: "文件标题", search: { el: "input" } },
|
||||
{ prop: "content", label: "文件内容", search: { el: "input" } },
|
||||
{ prop: "content", label: "文件内容", search: { el: "input" }, type: "html" },
|
||||
{ prop: "createByName", label: "发布人名称" },
|
||||
{ prop: "createTime", label: "发布时间" },
|
||||
{ prop: "operation", label: "操作", fixed: "right", width: 150 }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user