mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-14 19:52:10 +08:00
电池监控
This commit is contained in:
@@ -179,8 +179,9 @@ exports.removeViewContent = function () {
|
||||
/**
|
||||
* 电源监控
|
||||
*/
|
||||
exports.initPowerMonitor = function (event, channel, arg) {
|
||||
exports.initPowerMonitor = function (event, channel, arg) {
|
||||
|
||||
console.log('[electron] [ipc] [example] [initPowerMonitor] 结果:', arg);
|
||||
powerMonitor.on('on-ac', (e) => {
|
||||
let data = {
|
||||
type: 'on-ac',
|
||||
@@ -205,7 +206,7 @@ exports.removeViewContent = function () {
|
||||
event.reply(`${channel}`, data)
|
||||
});
|
||||
|
||||
powerMonitor.on('on-ac', (e) => {
|
||||
powerMonitor.on('unlock-screen', (e) => {
|
||||
let data = {
|
||||
type: 'unlock-screen',
|
||||
msg: '解锁了'
|
||||
|
||||
Reference in New Issue
Block a user