mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-19 17:54:37 +00:00
Merge pull request #3363 from jumpserver/pr@dev@perf_announcement_markdown
perf: 公告支持markdown语法
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
:title="title"
|
:title="title"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
>
|
>
|
||||||
<span class="announcement-main">{{ announcement.content }}</span>
|
<MarkDown class="markdown" :value="announcement.content" />
|
||||||
<span v-if="announcement.link">
|
<span v-if="announcement.link">
|
||||||
<el-link :href="announcement.link" target="_blank" type="info" class="link-more">
|
<el-link :href="announcement.link" target="_blank" type="info" class="link-more">
|
||||||
{{ $t('common.ViewMore') }}
|
{{ $t('common.ViewMore') }}
|
||||||
@@ -19,9 +19,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
|
import MarkDown from '@/components/Widgets/MarkDown'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Announcement',
|
name: 'Announcement',
|
||||||
|
components: { MarkDown },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
viewedKey: 'AnnouncementViewed'
|
viewedKey: 'AnnouncementViewed'
|
||||||
@@ -54,7 +56,7 @@ export default {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style lang="scss" scoped>
|
||||||
.announcement >>> .el-alert__content {
|
.announcement >>> .el-alert__content {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
@@ -70,4 +72,14 @@ export default {
|
|||||||
.icon {
|
.icon {
|
||||||
vertical-align: text-bottom;
|
vertical-align: text-bottom;
|
||||||
}
|
}
|
||||||
|
>>> .markdown-body {
|
||||||
|
background-color: transparent !important;
|
||||||
|
a {
|
||||||
|
color: var(--color-info) !important;
|
||||||
|
}
|
||||||
|
h1, h2, h3, h4, h5 {
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@@ -25,13 +25,12 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang='scss' scoped>
|
<style lang='scss' scoped>
|
||||||
|
.markdown-body {
|
||||||
|
background-color: #f3f3f3;
|
||||||
|
}
|
||||||
.markdown-body * {
|
.markdown-body * {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
background-color: #f3f3f3;
|
|
||||||
color: #1a1a1a;
|
color: #1a1a1a;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
//& >>> .table * {
|
|
||||||
// background-color: #f3f3f3;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Reference in New Issue
Block a user