浏览代码

调整缓存下刷新页面左侧菜单选中问题

笔下光年 4 年之前
父节点
当前提交
d69adc4351
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      js/bootstrap-multitabs/multitabs.js

+ 6 - 1
js/bootstrap-multitabs/multitabs.js

@@ -653,12 +653,17 @@ if (typeof jQuery === "undefined") {
                 $el = self.$element,
                 $el = self.$element,
                 options = self.options,
                 options = self.options,
                 storage, init = options.init,
                 storage, init = options.init,
-                param;
+                param,
+                tempParam;
             if (supportStorage(options.cache)) {
             if (supportStorage(options.cache)) {
                 storage = self._storage();
                 storage = self._storage();
                 self._resetStorage({});
                 self._resetStorage({});
                 $.each(storage, function (k, v) {
                 $.each(storage, function (k, v) {
                     self.create(v, false);
                     self.create(v, false);
+                    if (v.active) {
+                        tempParam = self._getParam(v);
+                        self._exist(tempParam).click();
+                    }
                 })
                 })
             }
             }
             if ($.isEmptyObject(storage)) {
             if ($.isEmptyObject(storage)) {