Skip to content

支持原生鸿蒙UA,否则纯血鸿蒙手机下_isMobile 返回非预期的 false #5569

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

mayunhai
Copy link

举例说明:
Mozilla/5.0 (Phone; OpenHarmony 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 ArkWeb/4.1.6.1 Mobile

// iphone return true
/android|phone/i.test('mozilla/5.0 (iphone; cpu iphone os 16_6 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/16.6 mobile/15e148 safari/604.1')
// openharmony  return true
/android|phone/i.test('mozilla/5.0 (phone; openharmony 5.0) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36  arkweb/4.1.6.1 mobile')

举例说明:
Mozilla/5.0 (Phone; OpenHarmony 5.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36  ArkWeb/4.1.6.1 Mobile
```javascript
// iphone return true
/android|phone/i.test('mozilla/5.0 (iphone; cpu iphone os 16_6 like mac os x) applewebkit/605.1.15 (khtml, like gecko) version/16.6 mobile/15e148 safari/604.1')
// openharmony  return true
/android|phone/i.test('mozilla/5.0 (phone; openharmony 5.0) applewebkit/537.36 (khtml, like gecko) chrome/114.0.0.0 safari/537.36  arkweb/4.1.6.1 mobile')
```
@mayunhai mayunhai changed the title 支持原生鸿蒙UA,否则纯血鸿蒙手机下_isMobile 返回非预期的 true 支持原生鸿蒙UA,否则纯血鸿蒙手机下_isMobile 返回非预期的 false Jun 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant