This commit is contained in:
pengxiaolong
2025-05-13 19:39:53 +08:00
parent 37da6765b8
commit c006a8e63d
1232 changed files with 96963 additions and 883 deletions

17
TUIKit/utils/env.ts Normal file
View File

@@ -0,0 +1,17 @@
import { getPlatform } from '@tencentcloud/universal-api';
declare const uni: any;
export const isPC = getPlatform() === 'pc';
export const isH5 = getPlatform() === 'h5';
export const isWeChat = getPlatform() === 'wechat';
export const isApp = getPlatform() === 'app';
export const isUniFrameWork = typeof uni !== 'undefined';
// H5, mini programs, and apps are all considered mobile.
// If you need to unify the mobile UI style, you can directly use isMobile to control
export const isMobile = isH5 || isWeChat || isApp;