We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0826f2 commit 1f56334Copy full SHA for 1f56334
src/runtime.ts
@@ -6,6 +6,16 @@ import {
6
import { initNativeApi } from './apis'
7
import { components } from './components'
8
9
+// 支付宝真机只有 navigator.swuserAgent
10
+const { userAgent } = navigator
11
+Object.defineProperty(navigator, 'userAgent', {
12
+ configurable: true,
13
+ enumerable: true,
14
+ get () {
15
+ return userAgent || (navigator as any).swuserAgent || ''
16
+ }
17
+})
18
+
19
hostConfig.initNativeApi = initNativeApi
20
21
mergeReconciler(hostConfig)
0 commit comments