refactor: 移除 .rich-text 富文本排版样式
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div v-if="detail?.content" class="notice-dialog__content rich-text" v-html="detail.content" />
|
||||
<div v-if="detail?.content" class="notice-dialog__content" v-html="detail.content" />
|
||||
<el-empty v-else :image-size="60" description="暂无内容" />
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
@@ -217,141 +217,3 @@
|
||||
gap: 8px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
/**
|
||||
* 富文本内容排版(通知公告、协议说明等 v-html 渲染区域)
|
||||
*/
|
||||
.rich-text {
|
||||
font-size: 14px;
|
||||
line-height: 1.8;
|
||||
color: var(--el-text-color-regular);
|
||||
overflow-wrap: break-word;
|
||||
|
||||
> :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
> :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 18px 0 10px;
|
||||
font-weight: 600;
|
||||
line-height: 1.4;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
ul,
|
||||
ol {
|
||||
padding-left: 22px;
|
||||
margin: 0 0 10px;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: disc;
|
||||
}
|
||||
|
||||
ol {
|
||||
list-style: decimal;
|
||||
}
|
||||
|
||||
li {
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-primary);
|
||||
}
|
||||
|
||||
a {
|
||||
color: var(--el-color-primary);
|
||||
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 8px 14px;
|
||||
margin: 12px 0;
|
||||
color: var(--el-text-color-secondary);
|
||||
background: var(--el-fill-color-light);
|
||||
border-left: 3px solid var(--el-color-primary-light-5);
|
||||
border-radius: 0 6px 6px 0;
|
||||
}
|
||||
|
||||
code {
|
||||
padding: 2px 5px;
|
||||
font-size: 12px;
|
||||
color: var(--el-color-danger);
|
||||
background: var(--el-fill-color-light);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
pre {
|
||||
padding: 12px 14px;
|
||||
overflow-x: auto;
|
||||
background: var(--el-fill-color-light);
|
||||
border-radius: 6px;
|
||||
|
||||
code {
|
||||
padding: 0;
|
||||
color: inherit;
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
|
||||
table {
|
||||
width: 100%;
|
||||
margin: 12px 0;
|
||||
font-size: 13px;
|
||||
border-collapse: collapse;
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 8px 10px;
|
||||
border: 1px solid var(--el-border-color-lighter);
|
||||
}
|
||||
|
||||
th {
|
||||
font-weight: 600;
|
||||
color: var(--el-text-color-primary);
|
||||
background: var(--el-fill-color-light);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -301,7 +301,7 @@
|
||||
{{ currentNotice.publishTime }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="公告内容:">
|
||||
<div class="notice-content rich-text" v-html="currentNotice.content" />
|
||||
<div class="notice-content" v-html="currentNotice.content" />
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
|
||||
Reference in New Issue
Block a user