电池监控

This commit is contained in:
wallace5303
2021-10-12 11:53:09 +08:00
parent 0f9187d009
commit c4e6297027
2 changed files with 4 additions and 2 deletions

View File

@@ -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: '解锁了'