Skip to content

Commit f491793

Browse files
SkyBird233HouLiXieBuRou
authored andcommitted
fix: download button's font size in SSG
1 parent 39cd254 commit f491793

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

components/download/DownloadButton.vue

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ const router = useRouter();
5353
const dialogState = ref(false);
5454
const archNameBrackets = props.archName.match(/^(.*?)([((].*[))])?$/);
5555
56+
// Adding "+ 'pt'" in v-bind() won't work correctly in SSG
57+
const firstLineFontSize = props.firstLineFontSize + 'pt';
58+
const secondLineFontSize = props.secondLineFontSize + 'pt';
59+
5660
const dialogTitle = computed(
5761
() => `${textValue.text1}${textValue.osName} - ${props.isaInfo?.label}`
5862
);
@@ -109,12 +113,12 @@ const onClick = () => {
109113
110114
<style scoped>
111115
.first-line-p {
112-
font-size: v-bind(firstLineFontSize + 'pt');
116+
font-size: v-bind(firstLineFontSize);
113117
font-weight: 450;
114118
}
115119
116120
.second-line-p {
117-
font-size: v-bind(secondLineFontSize + 'pt');
121+
font-size: v-bind(secondLineFontSize);
118122
font-weight: 400;
119123
}
120124

0 commit comments

Comments
 (0)