增加字体大小设置

This commit is contained in:
2026-07-03 11:45:16 +08:00
parent 451dd2330b
commit c3bd7960d0
28 changed files with 894 additions and 94 deletions
+9 -1
View File
@@ -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>