优化 `layer` 和 `upload` 文档

pull/1431/head
sight 2023-11-28 20:16:07 +08:00
parent e4ae678cb7
commit 2226f26114
2 changed files with 8 additions and 3 deletions

View File

@ -34,7 +34,7 @@ toc: true
| 关闭 : | - |
| [layer.close(index, callback)](#close) | 关闭对应的层,核心方法。 |
| [layer.closeAll(type, callback)](#closeAll) | 关闭所有对应类型的层。 |
| [layer.closeLast(type)](#closeLast) <sup>2.8+</sup> | 关闭最近打开的对应类型的层。 |
| [layer.closeLast(type, callback)](#closeLast) <sup>2.8+</sup> | 关闭最近打开的对应类型的层。 |
| 其他 : | - |
| [layer.config(options)](#config) | 全局配置默认属性。 |
| [layer.ready(callback)](#ready) | 样式初始化就绪。 |
@ -385,9 +385,10 @@ layer.closeAll('tips'); // 关闭所有的 tips 层
<h2 id="closeLast" lay-pid="api" class="ws-anchor ws-bold">关闭最近一次打开的层 <sup>2.8+</sup></h2>
`layer.closeLast(type);`
`layer.closeLast(type, callback);`
- 参数 `type` : 弹层的类型。可选值:`dialog,page,iframe,loading,tips`
- 参数 `callback` : 关闭弹层后的回调函数
该方法用于关闭最近一次打开的对应类型的层。

View File

@ -100,7 +100,11 @@ data: {
</td>
<td>string</td>
<td>-</td>
<td>
`json`
</td>
</tr>
<tr>
<td>