文件最后提交记录最后更新时间
fix(api): correct file naming format to method-module.method.md 17 天前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
fix(api): correct file naming format to method-module.method.md 17 天前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
fix(api): correct file naming format to method-module.method.md 17 天前
!20 merge docs/update-api-topic into master docs/update browserwindow doc Created-by: zhangqingnan_codeing Commit-by: zhangqingnan_codeing Merged-by: ohci1 Description: ### 一、内容说明(相关的Issue) 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:bundle exec xxx RAILS_ENV = production;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 自测测试结论: 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony-sig/electron!20 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
!20 merge docs/update-api-topic into master docs/update browserwindow doc Created-by: zhangqingnan_codeing Commit-by: zhangqingnan_codeing Merged-by: ohci1 Description: ### 一、内容说明(相关的Issue) 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:bundle exec xxx RAILS_ENV = production;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 自测测试结论: 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony-sig/electron!20 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
!20 merge docs/update-api-topic into master docs/update browserwindow doc Created-by: zhangqingnan_codeing Commit-by: zhangqingnan_codeing Merged-by: ohci1 Description: ### 一、内容说明(相关的Issue) 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:bundle exec xxx RAILS_ENV = production;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 自测测试结论: 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony-sig/electron!20 1 个月前
fix(api): correct file naming format to method-module.method.md 17 天前
!20 merge docs/update-api-topic into master docs/update browserwindow doc Created-by: zhangqingnan_codeing Commit-by: zhangqingnan_codeing Merged-by: ohci1 Description: ### 一、内容说明(相关的Issue) 建议测试完成时间:xxxx.xx.xx 投产上线时间:xxxx.xx.xx 提测地址:CI环境/压测环境 测试账号: * 3.1 关联PR列表 * 3.2 数据库和部署说明 1. 常规更新 2. 重启unicorn 3. 重启sidekiq 4. 迁移任务:是否有迁移任务,没有写 "无" 5. rake脚本:bundle exec xxx RAILS_ENV = production;没有写 "无" * 3.4 其他技术优化内容(做了什么,变更了什么) - 重构了 xxxx 代码 - xxxx 算法优化 * 3.5 废弃通知(什么字段、方法弃用?) * 3.6 后向不兼容变更(是否有无法向后兼容的变更?) 自测测试结论: 检查点: | 需求名称 | 是否影响xx公共模块 | 是否需要xx功能 | 需求升级是否依赖其他子产品 | |------|------------|----------|---------------| | xxx | 否 | 需要 | 不需要 | | | | | | 接口测试: 性能测试: 并发测试: 其他: See merge request: openharmony-sig/electron!20 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
docs: remove platform support section from API docs Signed-off-by: zhangqingnan_codeing <zhangqingnan6@huawei.com> 1 个月前
README.md

systemPreferences API 列表

本模块包含 36 个 API。

Events(事件)

API 说明 鸿蒙支持
accent-color-changed 在系统主题色发生变化时触发。 不支持
color-changed 在系统颜色配置发生变化时触发。 不支持

Methods(方法)

API 说明 鸿蒙支持
systemPreferences.isSwipeTrackingFromScrollEventsEnabled() 返回 boolean,表示「滑动页面」设置是否已开启。 不支持
systemPreferences.postNotification(event, userInfo[, deliverImmediately]) 将 event 以 macOS 原生通知形式发出,userInfo 为随通知发送的用户信息字典。 不支持
systemPreferences.postLocalNotification(event, userInfo) 将 event 以 macOS 本地原生通知形式发出,userInfo 为随通知发送的用户信息字典。 不支持
systemPreferences.postWorkspaceNotification(event, userInfo) 将 event 以 macOS Workspace 原生通知形式发出,userInfo 为随通知发送的用户信息字典。 不支持
systemPreferences.subscribeNotification(event, callback) 返回 number,即该订阅的 ID,用于订阅 macOS 原生通知。 不支持
systemPreferences.subscribeLocalNotification(event, callback) 返回 number,即该订阅的 ID,用于订阅 macOS 本地通知。 不支持
systemPreferences.subscribeWorkspaceNotification(event, callback) 返回 number,即该订阅的 ID,用于订阅 macOS Workspace 通知。 不支持
systemPreferences.unsubscribeNotification(id) 移除指定 ID 的通知订阅。 不支持
systemPreferences.unsubscribeLocalNotification(id) 与 unsubscribeNotification 类似,但从 NSNotificationCenter 中移除订阅者。 不支持
systemPreferences.unsubscribeWorkspaceNotification(id) 与 unsubscribeNotification 类似,但从 NSWorkspace.sharedWorkspace.notificationCenter 中移除订阅者。 不支持
systemPreferences.registerDefaults(defaults) 将指定的默认值添加到应用的 NSUserDefaults 中。 不支持
systemPreferences.getUserDefault(key, type) 返回 UserDefaultTypes[Type],获取 NSUserDefaults 中指定 key 的值,支持 url、array、dictionary 等类型。 不支持
systemPreferences.setUserDefault(key, type, value) 设置 NSUserDefaults 中指定 key 的值。 不支持
systemPreferences.removeUserDefault(key) 移除 NSUserDefaults 中指定的 key,可用于恢复之前通过 setUserDefault 设置的键的默认值或全局值。 不支持
systemPreferences.isAeroGlassEnabled() 返回 boolean,表示 DWM 合成(Aero Glass)是否已启用。 不支持
systemPreferences.getAccentColor() 返回 string,以 RGBA 十六进制格式返回用户当前的系统强调色。 不支持
systemPreferences.getColor(color) 返回 string,以 RGBA 十六进制格式(#RRGGBBAA)返回系统颜色设置,包含活动窗口标题栏渐变色等。 不支持
systemPreferences.getSystemColor(color) 返回 string,以 #RRGGBBAA 格式返回标准系统颜色。 不支持
systemPreferences.getEffectiveAppearance() 返回 string,可为 dark、light 或 unknown。 不支持
systemPreferences.canPromptTouchID() 返回 boolean,表示设备是否支持 Touch ID。 不支持
systemPreferences.promptTouchID(reason) 返回 Promise,用户通过 Touch ID 验证成功后 resolve。 不支持
systemPreferences.isTrustedAccessibilityClient(prompt) 返回 boolean,表示当前进程是否为受信任的辅助功能客户端。 不支持
systemPreferences.getMediaAccessStatus(mediaType) 返回 string,表示媒体访问状态,可为 not-determined、granted、denied、restricted 或 unknown。 不支持
systemPreferences.askForMediaAccess(mediaType) 返回 Promise,用户授权时 resolve 为 true,拒绝时为 false。若传入无效 mediaType 则 reject;若权限曾被拒绝,需通过系统偏好设置修改,重启应用后生效。 不支持
systemPreferences.getAnimationSettings() 返回包含动画设置信息的 Object。 支持
systemPreferences.requestDirectoryPermission([path]) 返回 Promise,请求目录访问权限。 支持
systemPreferences.requestSystemPermission(permission) 返回 Promise,请求指定的系统权限。 支持
systemPreferences.openApplicationInfoEntry() 打开 "系统设置"并进入应用程序信息页面。 支持
systemPreferences.fileAccessPersist(paths) 对传入的多个文件或目录持久化授权。 支持
systemPreferences.requestNotificationPermission() 弹出请求通知权限弹窗。 支持
systemPreferences.checkNotificationEnabled() 返回通知是否授权结果。 支持
systemPreferences.activateFileAccessPersist(paths) 使能已经永久授权过的文件或目录。 支持

Properties(属性)

API 说明 鸿蒙支持
systemPreferences.accessibilityDisplayShouldReduceTransparency 布尔属性,表示应用是否应避免使用半透明背景,对应 NSWorkspace.accessibilityDisplayShouldReduceTransparency。 不支持
systemPreferences.effectiveAppearance 返回当前应用的 macOS 外观设置,字符串类型,值为 dark、light 或 unknown。 不支持