for admin.js add jump function
parent
f8f0447c2f
commit
1f147596a8
|
|
@ -235,6 +235,16 @@ layui.define(['message', 'table', 'jquery', 'element', 'yaml', 'form', 'tab', 'm
|
||||||
msgInstance.click(messageTip);
|
msgInstance.click(messageTip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.jump = function(id,title,url){
|
||||||
|
if (config.tab.muiltTab) {
|
||||||
|
bodyTab.addTabOnly({id: id,title: title,url: url,icon: null,close: true},
|
||||||
|
300);
|
||||||
|
} else {
|
||||||
|
sideMenu.selectItem(id);
|
||||||
|
bodyFrame.changePage(url, title, true);
|
||||||
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var messageTip = function(id, title, context, form) {
|
var messageTip = function(id, title, context, form) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ menu:
|
||||||
## 视图内容配置
|
## 视图内容配置
|
||||||
tab:
|
tab:
|
||||||
## 是否开启多选项卡
|
## 是否开启多选项卡
|
||||||
muiltTab: true
|
muiltTab: false
|
||||||
## 切换选项卡时,是否刷新页面状态
|
## 切换选项卡时,是否刷新页面状态
|
||||||
keepState: true
|
keepState: true
|
||||||
## 是否开启 Tab 记忆
|
## 是否开启 Tab 记忆
|
||||||
|
|
|
||||||
|
|
@ -297,7 +297,7 @@
|
||||||
})
|
})
|
||||||
|
|
||||||
$("[to]").click(function(){
|
$("[to]").click(function(){
|
||||||
top.layui.frame.changePageByElement("content","http://www.baidu.com","百度一下",true)
|
top.layui.admin.jump(14,"百度一下","http://www.baidu.com",true)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue