mirror of
https://github.com/kuaifan/dootask.git
synced 2026-06-25 00:32:13 +00:00
fix(micro-app): 修复 resolveType 调用不存在的 $A.platformType 报错
$A 上从未定义 platformType 方法,resolveType 解析微应用类型时 必抛 "$A.platformType is not a function"。改用既有 $A.Platform 属性判断桌面端(web/mac/win),保持 desktop/mobile 语义不变。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b544c9d7f6
commit
e17a520599
@ -801,7 +801,8 @@ export default {
|
||||
? type.mobile
|
||||
: (typeof type.app === 'string' ? type.app : defaultType)
|
||||
const desktopType = typeof type.desktop === 'string' ? type.desktop : defaultType
|
||||
return $A.platformType() === 'desktop' ? desktopType : mobileType
|
||||
const isDesktop = ['web', 'mac', 'win'].includes($A.Platform)
|
||||
return isDesktop ? desktopType : mobileType
|
||||
}
|
||||
return 'inline'
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user