@@ -17,7 +17,7 @@ import {
1717 SOURCE_CODE_PAGE ,
1818} from "@util/constant/url"
1919import { type ComponentSize , ElCard , ElDescriptions , ElDescriptionsItem , ElDivider , ElText } from "element-plus"
20- import { computed , defineComponent } from "vue"
20+ import { computed , defineComponent , reactive } from "vue"
2121import DescLink from "./DescLink"
2222import "./description.sass"
2323import InstallationLink from "./InstallationLink"
@@ -32,12 +32,18 @@ const computeSize = (mediaSize: MediaSize): ComponentSize => {
3232 }
3333}
3434
35- const _default = defineComponent ( ( ) => {
35+ const _default = defineComponent < { } > ( ( ) => {
3636 const feedbackUrl = FEEDBACK_QUESTIONNAIRE [ locale ] || GITHUB_ISSUE_ADD
3737 const mediaSize = useMediaSize ( )
3838 const column = computed ( ( ) => mediaSize . value <= MediaSize . md ? 1 : 2 )
39- const isXs = computed ( ( ) => mediaSize . value === MediaSize . xs )
4039 const size = computed ( ( ) => computeSize ( mediaSize . value ) )
40+ const pages = reactive ( {
41+ homepage : HOMEPAGE ,
42+ privacy : PRIVACY_PAGE ,
43+ sourceCode : SOURCE_CODE_PAGE ,
44+ changeLog : CHANGE_LOG_PAGE ,
45+ email : AUTHOR_EMAIL ,
46+ } )
4147
4248 return ( ) => (
4349 < ElCard class = "about-card" >
@@ -54,31 +60,25 @@ const _default = defineComponent(() => {
5460 </ ElDescriptionsItem >
5561 < ElDescriptionsItem label = { t ( msg => msg . about . label . website ) } labelAlign = "right" >
5662 < DescLink href = { getHomepageWithLocale ( ) } >
57- { HOMEPAGE }
63+ { pages . homepage }
5864 </ DescLink >
5965 </ ElDescriptionsItem >
6066 < ElDescriptionsItem label = { t ( msg => msg . about . label . privacy ) } labelAlign = "right" >
61- < DescLink href = { PRIVACY_PAGE } >
62- { PRIVACY_PAGE }
63- </ DescLink >
67+ < DescLink href = { pages . privacy } />
6468 </ ElDescriptionsItem >
6569 < ElDescriptionsItem label = { t ( msg => msg . base . sourceCode ) } labelAlign = "right" >
66- < DescLink href = { SOURCE_CODE_PAGE } icon = "github" >
67- { SOURCE_CODE_PAGE }
68- </ DescLink >
70+ < DescLink href = { pages . sourceCode } icon = "github" />
6971 </ ElDescriptionsItem >
7072 < ElDescriptionsItem label = { t ( msg => msg . about . label . license ) } labelAlign = "right" >
7173 < DescLink href = { LICENSE_PAGE } >
7274 MIT License
7375 </ DescLink >
7476 </ ElDescriptionsItem >
7577 < ElDescriptionsItem label = { t ( msg => msg . base . changeLog ) } labelAlign = "right" >
76- < DescLink href = { CHANGE_LOG_PAGE } icon = "github" >
77- { CHANGE_LOG_PAGE }
78- </ DescLink >
78+ < DescLink href = { pages . changeLog } icon = "github" />
7979 </ ElDescriptionsItem >
8080 < ElDescriptionsItem label = { t ( msg => msg . about . label . support ) } labelAlign = "right" >
81- { AUTHOR_EMAIL }
81+ { pages . email }
8282 </ ElDescriptionsItem >
8383 < ElDescriptionsItem label = { t ( msg => msg . about . label . installation ) } labelAlign = "right" >
8484 < Flex gap = { 15 } align = "center" margin = { mediaSize . value === MediaSize . xs ? '5px 0' : 10 } >
0 commit comments