From 7dc7df59e03a80e11bbd06f40da79f8e84df9bc5 Mon Sep 17 00:00:00 2001 From: tianhao Date: Tue, 16 Jun 2026 13:57:01 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20README=E5=92=8C=E5=AE=98=E7=BD=91?= =?UTF-8?q?=E6=98=8E=E7=A1=AE=E5=85=A8=E5=B1=80=E4=BB=85MeToast=E5=92=8CMe?= =?UTF-8?q?t=E4=B8=A4=E4=B8=AA=E5=8F=98=E9=87=8F=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ site/index.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9648ed4..783c011 100644 --- a/README.md +++ b/README.md @@ -48,9 +48,14 @@ const MeToast = require('metona-toast'); ## 快速开始 +浏览器中 `window` 上会注册两个全局变量:`MeToast` 和 `Met`,两者完全等价,任选其一使用。 + ```javascript import MeToast from 'metona-toast'; +// 也可以使用 Met — 与 MeToast 完全等价 +Met.success('使用 Met 同样可用'); + // 基础用法 MeToast.success('操作成功!'); MeToast.error('操作失败!'); diff --git a/site/index.html b/site/index.html index a6d6ccd..1a511cc 100644 --- a/site/index.html +++ b/site/index.html @@ -138,7 +138,7 @@

快速开始

-

一行安装,三行代码即可使用

+

浏览器 window 上仅注册两个全局变量:MeToastMet,完全等价

# npm 安装
 npm install metona-toast