mirror of
https://github.com/smallmain/cocos-enhance-kit.git
synced 2025-12-13 15:08:45 +00:00
[adapters] 增加小游戏适配部分源码
This commit is contained in:
23
adapters/platforms/baidu/wrapper/builtin/WindowProperties.js
Executable file
23
adapters/platforms/baidu/wrapper/builtin/WindowProperties.js
Executable file
@@ -0,0 +1,23 @@
|
||||
/* eslint-disable */
|
||||
const { screenWidth, screenHeight, devicePixelRatio } = swan.getSystemInfoSync
|
||||
? swan.getSystemInfoSync()
|
||||
: { screenWidth: 0, screenHeight: 0, devicePixelRatio: 1} // Mock data
|
||||
|
||||
export const innerWidth = screenWidth
|
||||
export const innerHeight = screenHeight
|
||||
export { devicePixelRatio }
|
||||
export const screen = {
|
||||
width: screenWidth,
|
||||
height: screenHeight,
|
||||
availWidth: innerWidth,
|
||||
availHeight: innerHeight,
|
||||
availLeft: 0,
|
||||
availTop: 0,
|
||||
}
|
||||
export const scrollX = 0
|
||||
export const scrollY = 0
|
||||
export const ontouchstart = null
|
||||
export const ontouchmove = null
|
||||
export const ontouchend = null
|
||||
|
||||
export { default as performance } from './performance'
|
||||
Reference in New Issue
Block a user