mirror of
https://gitee.com/layui/layui.git
synced 2026-01-05 16:04:33 +08:00
fix(element.tab): 改进自定义 tab 的索引获取 (#1853)
This commit is contained in:
@@ -82,7 +82,7 @@ layui.define('jquery', function(exports){
|
||||
Element.prototype.tab = function(options){
|
||||
options = options || {};
|
||||
dom.on('click', options.headerElem, function(e){
|
||||
var index = $(this).index();
|
||||
var index = $(options.headerElem).index($(this));
|
||||
call.tabClick.call(this, {
|
||||
index: index,
|
||||
options: options
|
||||
|
||||
Reference in New Issue
Block a user