-
{{ warningData.subject }}
+
{{ warningData.subject }}
重要性
- {{tagMap[warningData.importance]?.text}}
+ {{
+ tagMap[warningData.importance]?.text
+ }}
-
+
预览
-
+
+
+
+ {{ warningData.group }} {{ warningData.publishTime }}
-
{{warningData.group}} {{ warningData.publishTime }}
确定
取消
@@ -33,48 +40,48 @@ import { ref } from 'vue';
const emit = defineEmits(['close']);
const propsData = defineProps(['type', 'warningData']);
-const warningData = ref({});
+const warningData: any = ref({});
const toolbarConfig = [
['undo', 'redo'],
['h1', 'h2', 'bold', 'italic', 'strike', 'underline', 'color', 'font'],
- ['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table'],
+ ['ul', 'ol', 'checklist', 'code', 'link', 'image', 'table']
];
const tagMap = {
- '致命': {
+ 致命: {
text: '致命',
color: '#c7000b'
},
- '高': {
+ 高: {
text: '高',
color: '#f66f6a'
},
- '中': {
+ 中: {
text: '中',
color: '#fac20a'
},
- '低': {
+ 低: {
text: '低',
color: '#5e7ce0'
},
- 'Critical': {
+ critical: {
text: '致命',
color: '#c7000b'
},
- 'High': {
+ high: {
text: '高',
color: '#f66f6a'
},
- 'Medium': {
+ medium: {
text: '中',
color: '#fac20a'
},
- 'Low': {
+ low: {
text: '低',
color: '#5e7ce0'
}
-}
+};
const mode = ref('readonly');
-console.log(propsData.warningData)
+console.log(propsData.warningData);
warningData.value = propsData.warningData ?? {
subject: '【漏洞排查预警】ApacheIgnite远程代码执行漏洞排查(CVE-2024-52577)',
importance: '高',
@@ -112,7 +119,7 @@ const handleModeChange = () => {
.sub-title {
display: flex;
justify-content: space-between;
- >div:first-of-type>span {
+ > div:first-of-type > span {
margin-right: 12px;
color: #808080;
font-family: HarmonyOS Sans SC;
@@ -120,10 +127,10 @@ const handleModeChange = () => {
}
}
}
-
+
.warning-text {
padding: 20px 20px 0;
- background: #F6F6F8;
+ background: #f6f6f8;
color: initial;
:deep .dp-md-readonly {
@@ -133,7 +140,7 @@ const handleModeChange = () => {
}
:deep .dp-md-view {
- background-color: #F6F6F8;
+ background-color: #f6f6f8;
h2 {
font-size: 1.5em;
@@ -141,7 +148,7 @@ const handleModeChange = () => {
}
p {
- color: #252B3A;
+ color: #252b3a;
font-family: 苹方-简;
font-size: 14px;
line-height: 24px;
@@ -150,10 +157,9 @@ const handleModeChange = () => {
}
.text-box {
-
div {
margin-bottom: 8px;
- color: #252B3A;
+ color: #252b3a;
font-family: HarmonyOS Sans SC;
font-weight: 600;
font-size: 16px;
@@ -161,7 +167,7 @@ const handleModeChange = () => {
}
::v-deep .devui-textarea {
- color: #252B3A;
+ color: #252b3a;
font-family: 苹方-简;
font-size: 14px;
line-height: 24px;
@@ -171,7 +177,7 @@ const handleModeChange = () => {
}
.warning-from {
- background: #F6F6F8;
+ background: #f6f6f8;
color: #808080;
font-family: HarmonyOS Sans SC;
font-size: 14px;
@@ -184,4 +190,4 @@ const handleModeChange = () => {
padding: 20px;
}
}
-
\ No newline at end of file
+