layui 新增tab标签页

复制代码
       // $("#fjyj").click(function () {
       //     //window.location.href = "/sysconfig/SuperVisorEdit";
       //     navigateToTeamPersonModule('/CollectData/GradeWarning/EduIndex', '分级预警');
       // });

function navigateToTeamPersonModule(url, name) {
            var ids = new Date().getTime();
            window.parent.layui.element.tabAdd('layuiminiTab',
                {
                    tabId: url,
                    href: url,
                    title: name,
                    content: `<iframe width="100%" height="100%" frameborder="no" border="0" marginwidth="0"  marginheight="0" src="${url}"></iframe>`,
                    id:ids,
                }
            );
            //窗体定位到新tab
            window.parent.layui.element.tabChange('layuiminiTab', ids);
            //跳转的同时关闭弹窗,便于返回页面后请求接口
            layer.close(layer.index);
        }

效果:

相关推荐
小王和八蛋3 分钟前
前端存储与离线应用实战:Cookie、LocalStorage、PWA 及 Service Worker 核心知识点
前端·javascript
JarvanMo6 分钟前
终极指南:在 Flutter 中通过 sign_in_with_apple 实现 Apple 登录
前端
Learner12 分钟前
Python异常处理
java·前端·python
tao35566715 分钟前
VS Code登录codex,报错(os error 10013)
java·服务器·前端
军军君0119 分钟前
Three.js基础功能学习七:加载器与管理器
开发语言·前端·javascript·学习·3d·threejs·三维
哈__20 分钟前
React Native 鸿蒙开发:内置 Share 模块实现无配置社交分享
javascript·react native·react.js
JarvanMo21 分钟前
情迷服务器驱动 UI:我在 Flutter 开发中的爱与哀愁
前端
tzy23324 分钟前
分享一个 HTTP(S) 代理&抓包工具,拦截和Mock Web客户端请求和服务端响应
前端·网络协议·http
代码小学僧29 分钟前
普通前端仔的 2025 : 年终总结与 AI 对我的影响
前端·程序员·ai编程
Mike_jia36 分钟前
TCP 粘包/拆包问题
前端