mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-01-28 07:14:40 +08:00
docs(notice): add example for passing Error directly with i18n key
This commit is contained in:
@@ -320,6 +320,7 @@ const baseShowNotice = (
|
||||
*
|
||||
* @example showNotice.success("profiles.page.feedback.notifications.batchDeleted");
|
||||
* @example showNotice.error(err); // pass an Error directly
|
||||
* @example showNotice.error("shared.feedback.notifications.common.refreshFailed", err); // Simply pass an Error directly; but we recommend using { err } with i18n key and placeholders.
|
||||
* @example showNotice.error("profiles.page.feedback.errors.invalidUrl", { url }, 4000);
|
||||
*/
|
||||
export const showNotice: ShowNotice = Object.assign(baseShowNotice, {
|
||||
|
||||
Reference in New Issue
Block a user