Function sendNotification

  • 发送 Notification

    Parameters

    • msg: string
    • Optionaltitle: string
    • Optionaloptions: {
          badge?: string;
          body?: string;
          data?: any;
          dir?: "auto" | "ltr" | "rtl";
          icon?: string;
          image?: string;
          lang?: "zh-CN" | "en-US";
          onClick?: any;
          onClose?: any;
          onError?: any;
          renotify?: boolean;
          requireInteraction?: boolean;
          silent?: boolean;
          tag?: string;
          timestamp?: number;
          vibrate?: VibratePattern;
      } | NotificationOptions

    Returns void

    sendNotification('测试通知', '测试标题', {...options}); /// 发送成功/失败