瀏覽代碼

优化菜单搜索结果点击

Karson 1 年之前
父節點
當前提交
42e91e10e6
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      public/assets/js/backend/index.js

+ 1 - 1
public/assets/js/backend/index.js

@@ -33,7 +33,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
                 if (val != '') {
                     $("ul.sidebar-menu li a[addtabs]:not([href^='javascript:;'])").each(function () {
                         if ($("span:first", this).text().indexOf(val) > -1 || $(this).attr("py").indexOf(val) > -1 || $(this).attr("pinyin").indexOf(val) > -1) {
-                            html.push('<a data-url="' + $(this).attr("href") + '" href="javascript:;">' + $("span:first", this).text() + '</a>');
+                            html.push('<a data-url="' + ($(this).attr("url") || $(this).attr("href")) + '" href="javascript:;">' + $("span:first", this).text() + '</a>');
                             if (html.length >= 100) {
                                 return false;
                             }