diff --git a/build/info.ts b/build/info.ts index 6d7c8be..e5a1061 100644 --- a/build/info.ts +++ b/build/info.ts @@ -7,7 +7,7 @@ import boxen, { type Options as BoxenOptions } from "boxen"; dayjs.extend(duration); const welcomeMessage = gradientString("cyan", "magenta").multiline( - `您好! 欢迎使用 pure-admin 开源项目\n我们为您精心准备了下面两个贴心的保姆级文档\nhttps://pure-admin.github.io/pure-admin-doc\nhttps://pure-admin-utils.netlify.app` + `保姆级文档\nhttps://pure-admin.github.io/pure-admin-doc\nhttps://pure-admin-utils.netlify.app` ); const boxenOptions: BoxenOptions = { diff --git a/src/assets/fonts/Alibaba_PuHuiTi_Regular.ttf b/src/assets/fonts/Alibaba_PuHuiTi_Regular.ttf new file mode 100644 index 0000000..b69b510 Binary files /dev/null and b/src/assets/fonts/Alibaba_PuHuiTi_Regular.ttf differ diff --git a/src/assets/fonts/global.css b/src/assets/fonts/global.css new file mode 100644 index 0000000..be1dcaa --- /dev/null +++ b/src/assets/fonts/global.css @@ -0,0 +1,11 @@ +@font-face { + font-family: "AlibabaPuHuiTi"; + src: url("@/assets/fonts/Alibaba_PuHuiTi_Regular.ttf") format("truetype"); + font-weight: normal; + font-style: normal; + font-display: swap; +} + +body { + font-family: "AlibabaPuHuiTi", sans-serif; +} diff --git a/src/assets/scss/reset.scss b/src/assets/scss/reset.scss new file mode 100644 index 0000000..5251d88 --- /dev/null +++ b/src/assets/scss/reset.scss @@ -0,0 +1,14 @@ +.el-button--small:not(.el-button--text), +.el-radio-button--small .el-radio-button__inner { + padding: 8px 16px; + font-size: 14px; +} + +.el-button--text { + padding: 0; + font-size: 14px; +} + +.el-button--default { + border-color: #d0d0d0; +} diff --git a/src/main.ts b/src/main.ts index f9bcbdd..49eff20 100644 --- a/src/main.ts +++ b/src/main.ts @@ -22,6 +22,10 @@ import "element-plus/dist/index.css"; import "./assets/iconfont/iconfont.js"; import "./assets/iconfont/iconfont.css"; +//导入全局字体 +import "@/assets/fonts/global.css"; +import "@/assets/scss/reset.scss"; // Import global CSS reset file + const app = createApp(App); // 自定义指令 diff --git a/src/views/dashboard/CardShow.vue b/src/views/dashboard/CardShow.vue new file mode 100644 index 0000000..e69de29 diff --git a/src/views/dashboard/components/VulnerabilityCard.vue b/src/views/dashboard/components/VulnerabilityCard.vue new file mode 100644 index 0000000..2cc0d99 --- /dev/null +++ b/src/views/dashboard/components/VulnerabilityCard.vue @@ -0,0 +1,164 @@ + + + + + diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index ac1e9f8..5e9eb7f 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -9,7 +9,7 @@ import { Tooltip, Legend } from "chart.js"; -import Card from "@/components/Card/Card.vue"; +import VulnerabilityCard from "@/views/dashboard/components/VulnerabilityCard.vue"; ChartJS.register(BarElement, CategoryScale, LinearScale, Tooltip, Legend); const projectInfo = ref({ @@ -18,24 +18,23 @@ const projectInfo = ref({ scanTimes: 10, scanFiles: 62655 }); - -const vulnerabilities = ref([ - { id: "CVE-2024-9999", description: "发生堆缓冲区溢出攻击" }, - { id: "CVE-123456", description: "发布在一天之前 2024-7-23 11:44" } -]); - const recentScansData = ref({ labels: ["一月", "二月", "三月", "四月", "五月"], datasets: [ { label: "软件成分分析", - backgroundColor: "#72a4d2", - data: [613, 448, 540, 652, 977] + backgroundColor: "#ff6384", + data: [20, 42, 37, 45, 54] }, { - label: "静态代码扫描(SAST)", - backgroundColor: "#8cd17d", - data: [138, 936, 777, 590, 54] + label: "Fuzz测试", + backgroundColor: "#36a2eb", + data: [12, 23, 34, 45, 56] + }, + { + label: "静态代码分析", + backgroundColor: "#33bb33", + data: [32, 45, 23, 54, 32] } ] }); @@ -71,101 +70,125 @@ const appRankingData = ref({ } ] }); +const radio3 = ref("静态代码分析"); - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/views/project/ProjectDetail.vue b/src/views/project/ProjectDetail.vue index 6482e7c..e210b87 100644 --- a/src/views/project/ProjectDetail.vue +++ b/src/views/project/ProjectDetail.vue @@ -14,28 +14,6 @@ - - - - - - - - - - - - - - - - - - - - - - @@ -59,7 +37,7 @@ - + diff --git a/src/views/welcome/index.vue b/src/views/welcome/index.vue deleted file mode 100644 index 695b80b..0000000 --- a/src/views/welcome/index.vue +++ /dev/null @@ -1,9 +0,0 @@ - - -