File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -50,6 +50,9 @@ const GLOBAL_SENSITIVE_WORDS_ENCODED = [
5050// 解码敏感词列表
5151const GLOBAL_SENSITIVE_WORDS = GLOBAL_SENSITIVE_WORDS_ENCODED .map (word => Base64 .decode (word))
5252
53+ // 一言字体大小比例(75%的全局字体大小)
54+ const HITOKOTO_FONT_RATIO = 0.75
55+
5356export default {
5457 name: ' HitokotoCard' ,
5558 data () {
@@ -72,7 +75,7 @@ export default {
7275 computed: {
7376 contentStyle () {
7477 return {
75- ' font-size' : ` ${ this .fontSize } px` ,
78+ ' font-size' : ` ${ this .fontSize * HITOKOTO_FONT_RATIO } px` ,
7679 ' white-space' : ' pre-wrap' ,
7780 ' line-height' : ' 1.6' ,
7881 ' text-align' : ' left'
@@ -81,7 +84,7 @@ export default {
8184 authorStyle () {
8285 const AUTHOR_FONT_RATIO = 0.6 // Author font size is 60% of the main font size
8386 return {
84- ' font-size' : ` ${ this .fontSize * AUTHOR_FONT_RATIO } px` ,
87+ ' font-size' : ` ${ this .fontSize * HITOKOTO_FONT_RATIO * AUTHOR_FONT_RATIO } px` ,
8588 ' text-align' : ' left'
8689 }
8790 }
You can’t perform that action at this time.
0 commit comments