mirror of
https://gitee.com/layui/layui.git
synced 2025-10-07 23:24:32 +08:00
feat(tabs): 为 tabs.add 新增 active 选项 (#2607)
* tabs.add新增chang 是否将插入项切换为当前标签,l默认为true * change参数 * feat: 将 `change` 选项更改命名为 `active` * chore: 修改 closable 选项 JSDoc 类型 --------- Co-authored-by: 贤心 <3277200+sentsim@users.noreply.github.com>
This commit is contained in:
@@ -110,6 +110,7 @@ tabs.render({
|
||||
| id | 标签的 `lay-id` 属性值 | string | - |
|
||||
| index | 活动标签的索引或 `lay-id` 属性值,默认取当前选中标签的索引 | number | - |
|
||||
| mode | 标签的插入方式。支持以下可选值:<ul><li>`append` 插入标签到最后</li> <li>`prepend` 插入标签到最前</li> <li>`before` 在活动标签前插入</li> <li>`after` 在活动标签后插入</li></ul> | string | `append` |
|
||||
| active | 是否将新增项设置为活动标签 | boolean | `true` |
|
||||
| closable | 标签是否可关闭。初始值取决于 `options.closable` | boolean | `false` |
|
||||
| headerItem | 自定义标签头部元素,如 `headerItem: '<li></li>'` | string | - |
|
||||
| bodyItem | 自定义标签内容元素,如 `bodyItem: '<div></div>'` | string | - |
|
||||
|
Reference in New Issue
Block a user