You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2025. It is now read-only.
Bug description:
现在的版本不支持h5定位权限获取.
建议在 RNCWebView.ets 中增加 onGeolocationShow 方法
.geolocationAccess(this.descriptorWrapper.rawProps.geolocationEnabled) // 在此下一行增加
.onGeolocationShow((event) => { // 地理位置权限申请通知
AlertDialog.show({
title: '位置权限请求',
message: '是否允许获取位置信息',
primaryButton: {
value: '拒绝',
action: () => {
if (event) {
event.geolocation.invoke(event.origin, false, false); // 不允许此站点地理位置权限请求
}
}
},
secondaryButton: {
value: '允许',
action: () => {
if (event) {
event.geolocation.invoke(event.origin, true, true); // 允许此站点地理位置权限请求
}
}
},
cancel: () => {
if (event) {
event.geolocation.invoke(event.origin, false, false); // 不允许此站点地理位置权限请求
}
}
})
})
To Reproduce:
Expected behavior:
Screenshots/Videos:
Environment: