mirror of
https://gitee.com/layui/layui.git
synced 2025-04-05 17:38:02 +08:00
fix(element.tab): 改进自定义 tab 的索引获取 (#1853)
This commit is contained in:
parent
b8a6f45efa
commit
0a89d275e5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user