增加字体大小设置
This commit is contained in:
@@ -3,6 +3,9 @@ export default {
|
||||
onLaunch() {
|
||||
console.log('App Launch')
|
||||
|
||||
// 🔥 初始化字体缩放(使用 Vuex)
|
||||
this.$store.dispatch('font/initFontScale')
|
||||
|
||||
// 从本地存储恢复登录状态
|
||||
const token = uni.getStorageSync('token')
|
||||
const userInfo = uni.getStorageSync('userInfo')
|
||||
@@ -25,7 +28,6 @@ export default {
|
||||
// 初始化扫码模式配置
|
||||
this.$store.dispatch('scan/initScanMode')
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -37,5 +39,11 @@ export default {
|
||||
|
||||
page {
|
||||
height: 100%;
|
||||
|
||||
/*
|
||||
* 使用 rem 方案后,不需要设置 font-size
|
||||
* 所有元素使用 rem 单位,会自动相对于根字体大小计算
|
||||
* 根字体大小由 JavaScript 动态设置(document.documentElement.style.fontSize)
|
||||
*/
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user