mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-08 19:12:48 +08:00
feat: 回退页面时,如果页面不存在,则创建并从菜单读取标题
This commit is contained in:
@@ -1,13 +1,17 @@
|
||||
(function () {
|
||||
var element = layui.element;
|
||||
$ = layui.$;
|
||||
|
||||
|
||||
var miniTab = {
|
||||
renderOptions:{},
|
||||
/**
|
||||
* 初始化tab
|
||||
* @param options
|
||||
*/
|
||||
render: function (options) {
|
||||
this.renderOptions = options;
|
||||
|
||||
options.filter = options.filter || null;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
options.maxTabNum = options.maxTabNum || 20;
|
||||
@@ -180,6 +184,10 @@
|
||||
* @param menuList
|
||||
*/
|
||||
searchMenu: function (href, menuList) {
|
||||
if(!menuList){
|
||||
menuList = this.renderOptions.menuList
|
||||
}
|
||||
|
||||
var menu;
|
||||
for (key in menuList) {
|
||||
var item = menuList[key];
|
||||
@@ -393,6 +401,7 @@
|
||||
listenSwitch: function (options) {
|
||||
options.filter = options.filter || null;
|
||||
options.urlHashLocation = options.urlHashLocation || false;
|
||||
|
||||
options.listenSwichCallback = options.listenSwichCallback || function () { };
|
||||
element.on('tab(' + options.filter + ')', function (data) {
|
||||
var tabId = $(this).attr('lay-id');
|
||||
|
||||
Reference in New Issue
Block a user