<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>main</title>
</head>
<!-- jquery核心库 -->
<script type="text/javascript" src="easyui/jquery.min.js"></script>
<!-- easyui核心库 -->
<script type="text/javascript" src="easyui/jquery.easyui.min.js"></script>
<!-- easyui核心UI文件 css -->
<link href="easyui/themes/default/easyui.css" rel="stylesheet"
type="text/css" />
<!-- easyui图标 -->
<link href="easyui/themes/icon.css" rel="stylesheet" type="text/css" />
<!-- easyui国际化文件 -->
<script type="text/javascript" src="easyui/locale/easyui-lang-zh_CN.js"></script>
<script>
var datajson=[
{
text: "部门管理",
state: "closed",
children: [
{
text: "部门列表",
attributes: {
url:"./add.html"
}
},
{
text: "部门设置",
attributes: {
url:"./add.html"
}
},
{
text: "部门操作",
attributes: {
url:"./add.html"
}
},
]
},
{
text: "员工管理",
state: "closed",
children: [{
text: "员工列表",
attributes: {
url:"./add.html"
}
}]
},
{
text: "角色管理",
state: "closed",
children: [{
text: "角色列表",
attributes: {
url:"./add.html"
}
}]
},
{
text: "权限管理",
state: "closed",
children: [{
text: "权限列表",
attributes: {
url:"./add.html"
}
}]
},
{
text: "系统管理",
state: "closed",
children: [{
text: "退出系统",
attributes: {
url:"./add.html"
}
}]
}
]
/* 树形结构加载的是文件或者访问的是地址的时候 使用属性url
如果加载固定数据 使用属性data */
$(function(){
$('#tt').tree({
data:datajson,
onSelect : function(node) {
//有地址对应的进行跳转
if(node.attributes){
//alert(node.attributes.url);
OpenTab(node.text,node.attributes.url);
}
}
});
function OpenTab(Text,URL) {
//alert(Text);
// 添加一个未选中状态的选项卡面板,具体参考Easyui table 选项卡
if ($("#MenusTabs").tabs('exists', text)) {
$('#MenusTabs').tabs('select', text);
} else {
var Content = '<iframe scrolling="auto" frameborder="0" src="'+URL+'" style="width:100%;height:100%;"></iframe>';
$('#MenusTabs').tabs('add', {
title : Text,
closable : true,
content : Content
});
}
}
})
</script>
<body class="easyui-layout">
<div data-options="region:'north',title:'North Title',split:true" style="height: 100px;"></div>
<div data-options="region:'west',title:'West',split:true" style="width: 200px;">
<ul id="tt"></ul>
</div>
<div data-options="region:'center'" style="padding: 5px; background: #eee;">
<div id="MenusTabs" class="easyui-tabs" fit="true" border="false">
<div title="首页">
<div align="center" style=" padding-top:100px;">
<font color="red" size="15">
Welcome ! Enjoy To Use EasyUI!
</font></br>
<font color="red" size="15">
欢迎 ! 享受 easyUI!~
</font>
</div>
</div>
</div>
</div>
</body>
</html>
easyUI左侧导航联动tab没反应?哪位大神帮忙看一下!
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-
2条回答 默认 最新
- mym2018 2019-03-25 17:42关注
可能原因 1浏览器问题,换其他浏览器试试
12是否缺少
3 $('#tt').tree({ 执行这个函数了么,tab导航都是 url:"./add.html" 是否由于这个原因解决 无用评论 打赏 举报
悬赏问题
- ¥15 (希望可以解决问题)ma和mb文件无法正常打开,打开后是空白,但是有正常内存占用,但可以在打开Maya应用程序后打开场景ma和mb格式。
- ¥20 ML307A在使用AT命令连接EMQX平台的MQTT时被拒绝
- ¥20 腾讯企业邮箱邮件可以恢复么
- ¥15 有人知道怎么将自己的迁移策略布到edgecloudsim上使用吗?
- ¥15 错误 LNK2001 无法解析的外部符号
- ¥50 安装pyaudiokits失败
- ¥15 计组这些题应该咋做呀
- ¥60 更换迈创SOL6M4AE卡的时候,驱动要重新装才能使用,怎么解决?
- ¥15 让node服务器有自动加载文件的功能
- ¥15 jmeter脚本回放有的是对的有的是错的