mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-02-04 07:53:11 +00:00
Merge pull request #28 from ZeroCatDev/copilot/adjust-font-size
[WIP] Adjust font size for 一言 element
This commit is contained in:
commit
8a8ea05d81
@ -50,6 +50,9 @@ const GLOBAL_SENSITIVE_WORDS_ENCODED = [
|
|||||||
// 解码敏感词列表
|
// 解码敏感词列表
|
||||||
const GLOBAL_SENSITIVE_WORDS = GLOBAL_SENSITIVE_WORDS_ENCODED.map(word => Base64.decode(word))
|
const GLOBAL_SENSITIVE_WORDS = GLOBAL_SENSITIVE_WORDS_ENCODED.map(word => Base64.decode(word))
|
||||||
|
|
||||||
|
// 一言字体大小比例(75%的全局字体大小)
|
||||||
|
const HITOKOTO_FONT_RATIO = 0.75
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'HitokotoCard',
|
name: 'HitokotoCard',
|
||||||
data() {
|
data() {
|
||||||
@ -72,7 +75,7 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
contentStyle() {
|
contentStyle() {
|
||||||
return {
|
return {
|
||||||
'font-size': `${this.fontSize}px`,
|
'font-size': `${this.fontSize * HITOKOTO_FONT_RATIO}px`,
|
||||||
'white-space': 'pre-wrap',
|
'white-space': 'pre-wrap',
|
||||||
'line-height': '1.6',
|
'line-height': '1.6',
|
||||||
'text-align': 'left'
|
'text-align': 'left'
|
||||||
@ -81,7 +84,7 @@ export default {
|
|||||||
authorStyle() {
|
authorStyle() {
|
||||||
const AUTHOR_FONT_RATIO = 0.6 // Author font size is 60% of the main font size
|
const AUTHOR_FONT_RATIO = 0.6 // Author font size is 60% of the main font size
|
||||||
return {
|
return {
|
||||||
'font-size': `${this.fontSize * AUTHOR_FONT_RATIO}px`,
|
'font-size': `${this.fontSize * HITOKOTO_FONT_RATIO * AUTHOR_FONT_RATIO}px`,
|
||||||
'text-align': 'left'
|
'text-align': 'left'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user