| 1 | /* |
| 2 | * @Author: nevin |
| 3 | * @Date: 2025-03-23 14:53:37 |
| 4 | * @LastEditTime: 2025-03-23 18:23:23 |
| 5 | * @LastEditors: nevin |
| 6 | * @Description: 通知的全局组件 |
| 7 | */ |
| 8 | // |
| 9 | import { SendChannelEnum } from '@@/UtilsEnum'; |
| 10 | import { notification } from 'antd'; |
| 11 | import React, { FC, useEffect } from 'react'; |
| 12 | |
| 13 | interface InformProps { |
| 14 | onChooseItem: () => void; |
| 15 | } |
| 16 | const Inform: FC<InformProps> = ({}) => { |
| 17 | const e = window.ipcRenderer.on(SendChannelEnum.AutoRun, (e, args) => { |
| 18 | console.log('--------- e', e); |
| 19 | console.log('--------- args', args); |
| 20 | |
| 21 | notification.open({ |
| 22 | message: '自动化任务', |
| 23 | description: |
| 24 | 'This is the content of the notification. This is the content of the notification. This is the content of the notification.', |
| 25 | onClick: () => { |
| 26 | console.log('Notification Clicked!'); |
| 27 | }, |
| 28 | }); |
| 29 | }); |
| 30 | |
| 31 | useEffect(() => {}, []); |
| 32 | |
| 33 | function onChooseItem() { |
| 34 | console.log('onChooseItem'); |
| 35 | } |
| 36 | return <></>; |
| 37 | }; |
| 38 | export default Inform; |
| 39 |