docs: README和官网明确全局仅MeToast和Met两个变量名

This commit is contained in:
tianhao
2026-06-16 13:57:01 +08:00
parent cab5ef1d55
commit 7dc7df59e0
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -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('操作失败!');