當前位置:
首頁 >
【ruoyi若依】为当前页添加显示事件
發布時間:2024/9/19
40
豆豆
生活随笔
收集整理的這篇文章主要介紹了
【ruoyi若依】为当前页添加显示事件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
前言
- ruoyi 4.6.0
為當前頁添加顯示事件
- 獲取當前頁的data-id
- 通過data-id找到當前頁的menuTab
- 向當前頁的menuTab按鈕中添加click事件
示例
在首頁添加如下代碼:
var topWindow = $(window.parent.document);var myIFrame = $('.RuoYi_iframe[name="' + window.name + '"]', topWindow);if (myIFrame) {var myIFrameId = myIFrame.data("id");$('.menuTab[data-id="' + myIFrameId + '"]', topWindow).click(function(){console.log("my iframe active");});}運行效果如下(從通知公告切換到首頁):
總結
以上是生活随笔為你收集整理的【ruoyi若依】为当前页添加显示事件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: chrome谷歌浏览器设置代理
- 下一篇: 【ruoyi若依】flot 图表跑版