mirror of
https://github.com/ZeroCatDev/Classworks.git
synced 2026-02-04 16:03:10 +00:00
Address code review: use named constant and safe initialization
Co-authored-by: Sunwuyuan <88357633+Sunwuyuan@users.noreply.github.com>
This commit is contained in:
parent
a332d9365f
commit
bf56de8299
@ -66,7 +66,7 @@ export default {
|
|||||||
loading: false,
|
loading: false,
|
||||||
timer: null,
|
timer: null,
|
||||||
unwatch: null,
|
unwatch: null,
|
||||||
fontSize: SettingsManager.getSetting('font.size')
|
fontSize: 28 // Will be updated in mounted()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -79,9 +79,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
authorStyle() {
|
authorStyle() {
|
||||||
// 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 * 0.6}px`,
|
'font-size': `${this.fontSize * AUTHOR_FONT_RATIO}px`,
|
||||||
'text-align': 'left'
|
'text-align': 'left'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user