提交 ed3a7b3a 编写于 作者: fxy060608's avatar fxy060608

fix(v3): ensure fontSize (question/91512)

上级 6fcb0089
......@@ -32,7 +32,15 @@ let PageVueComponent
const handleData = {
[PAGE_CREATE]: function onPageCreate (data) {
const [pageId, pagePath, pageOptions] = data
document.title = `${pagePath}[${pageId}]`
document.title = `${pagePath}[${pageId}]`
// 页面存在横竖屏切换时,预加载的 webview 的 fontSize 需要再次校正一下
const oldFontSize = document.documentElement.style.fontSize
const newFontSize = document.documentElement.clientWidth / 20 + 'px'
if (oldFontSize !== newFontSize) {
document.documentElement.style.fontSize = newFontSize
}
// 设置当前页面伪对象,方便其他地方使用 getCurrentPages 获取当前页面 id,route
setCurrentPage(pageId, pagePath)
// 通知页面创建,根据当前页面配置信息,初始化部分事件
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册