提交 0b680c37 编写于 作者: 雪洛's avatar 雪洛

fix(harmony): 修复getBaseSystemInfo在view层调用报错的Bug

上级 8503b15e
...@@ -6,11 +6,13 @@ declare function lpx2px(value: number): number ...@@ -6,11 +6,13 @@ declare function lpx2px(value: number): number
* @returns * @returns
*/ */
export function getBaseSystemInfo() { export function getBaseSystemInfo() {
const plus = weex.requireModule('plus') // @ts-expect-error view 层
if (typeof __SYSTEM_INFO__ !== 'undefined') {
return (window as any).__SYSTEM_INFO__
}
return { return {
platform: 'harmony', platform: 'harmony',
pixelRatio: vp2px(1), pixelRatio: vp2px(1),
windowWidth: lpx2px(720), // TODO designWidth可配置 windowWidth: lpx2px(720), // TODO designWidth可配置
language: plus.getLanguage(),
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册