Electron 节点通知程序snoretoast按钮文本如何支持中文

Electron 节点通知程序snoretoast按钮文本如何支持中文,electron,node-notifier,Electron,Node Notifier,如果我使用中文,则不会执行相应的事件。 应该是buff转换后激活类型发生了变化。如何解决这个问题。请帮帮我。非常感谢。 更多信息可以在这里找到 notifier.removeAllListeners(); notifier.notify( { message: 'Hello', wait: true, timeout: false, actions: ['确认', '取消'], }, function (err, da

如果我使用中文,则不会执行相应的事件。 应该是buff转换后激活类型发生了变化。如何解决这个问题。请帮帮我。非常感谢。

更多信息可以在这里找到

notifier.removeAllListeners();
  notifier.notify(
    {
      message: 'Hello',
      wait: true,
      timeout: false,
      actions: ['确认', '取消'],
    },
    function (err, data) {
      // Will also wait until notification is closed.
      console.log('Waited');
      console.log('确认');
      console.log(err, data);
      // if(`${data}`.toString('utf8le') == '确认') {
      //   console.log('866666633333333')
      // }
    }
  );
  notifier.on('activate', () => {
    console.log('Clicked!');
  });
  notifier.on('dismissed', () => {
    console.log('Dismissed!');
  });
  // Buttons actions (lower-case):
  notifier.on('确认', () => {
    console.log('"Ok" was pressed');
  });
  notifier.on('取消', () => {
    console.log('"Cancel" was pressed');
  });