当前位置:网站首页>[ruoyi] Popover
[ruoyi] Popover
2022-07-21 12:04:00 【sayyy】
Preface
- 4.6
popover
Bootstrap pop-up (Popover) plug-in unit , Reference resources :
- https://www.runoob.com/bootstrap/bootstrap-popover-plugin.html
- https://v3.bootcss.com/javascript/#popovers
- Source code :https://www.cnblogs.com/xiaobie123/p/5997617.html
- https://www.tutorialspoint.com/bootstrap/bootstrap_popover_plugin.htm
Ruoyi (ruoyi) Use in popover Realization “ more ” Operation function .
Add click the blank space to close popover function
$("body").on("click", function() {
//$(".popover").popover("hide");
$('.table [data-toggle="popover"]').popover("hide");
});
- Click anywhere on the page , close ( hide )popover.
- Ruoyi (ruoyi) Use in popover The default trigger method of is
hover
The way .
It can also be changed to : Click the more button to pop up popover , Click the blank space to close popover function
1. popover The trigger mode of is changed to manual
( Manual ) The way
actions.push('<a class="btn btn-info btn-xs" role="button" data-container="body" data-placement="bottom" data-toggle="popover" data-html="true" data-trigger="manual" data-content="' + moreMenu + '">
<i class="fa fa-chevron-circle-right"></i> more </a>');
data-trigger="manual"
: Trigger mode ismanual
The way
2. Click the more button to pop up popover
$("#bootstrap-table").on("post-body.bs.table", function (e, args) {
$('.table [data-toggle="popover"]').popover();
$('.table [data-toggle="popover"]').click(function () {
/* Close all popover*/
$('.table [data-toggle="popover"]').popover("hide");
/* Open the corresponding popover:toggle Presentation display / Hide the pop-up box of the element , Switch hidden elements , Make it show */
$(this).popover("toggle");
/* No bubbling of events */
var e = arguments.callee.caller.arguments[0] || event;
e.stopPropagation();
});
});
$("body").on("click", function() {
$('.table [data-toggle="popover"]').popover("hide");
});
Improved writing :
$("body").on("click", function() {
$(".popover_open").popover("hide");
});
$("#bootstrap-table").on("post-body.bs.table", function (e, args) {
$('.table [data-toggle="popover"]').popover()
.on('show.bs.popover', function () {
$(this).addClass("popover_open");/* open popover when , Add an open tag */
}).on('hide.bs.popover', function () {
$(this).removeClass("popover_open");/* close popover when , Remove open tag */
});
$('.table [data-toggle="popover"]').click(function () {
/* Close all popover*/
$('.table [data-toggle="popover"]').popover("hide");
/* Open the corresponding popover:toggle Presentation display / Hide the pop-up box of the element , Switch hidden elements , Make it show */
$(this).popover("toggle");
/* No bubbling of events */
var e = arguments.callee.caller.arguments[0] || event;
e.stopPropagation();
});
});
边栏推荐
- 结合pyqt5开发办公文档一键转换软件,以后再也不用开会员转文件了
- KDD cup 2022 Baidu - 榜单
- Simulated exhaustive 731 My schedule II
- Shandong University, Beijing post, Harbin Institute of technology | multimodal dialog systems with dual knowledge enhanced generic trained language model
- Could not resolve all dependencies for configuration的解决方案
- Mysql:Error Code 1235,This version of MySQL doesn’t yet support ‘LIMIT & IN/ALL/ANY/SOME
- "Fundamentals of program design" Chapter 10 function and program structure 6-11 recursive calculation of P function (15 points)
- XCTF-ms0_ 01
- 支持同花顺的证券公司怎么选择?手机上开户安不安全
- OREPA:阿里提出训练也很快的重参数策略,内存减半,速度加倍 | CVPR 2022
猜你喜欢
随机推荐
Django查询出MySQL数据库的QuerySet 对象数据 转化成 json 字符串
查看kingbase版本号
【问题解决】win服务器磁盘初始化
支持向量机学习笔记(1)
AIX挂载NFS写入效率低的解决方案
WPS前骨干历时10年打造新型软件,Excel用户:我为此改用WPS
chrome插件开发入门实战——CSDN免登陆拷贝、免关注查看
如何在 FreeBSD 上设置 PF 防火墙来保护 Web 服务器
一级建造师证怎么考?手把手教你,看完这篇文章就都懂了!
线性回归模型笔记(2)
Lenovo exposed new UEFI vulnerabilities, affecting 70 models and millions of laptops
Aiops learning path
联想曝新型UEFI漏洞,影响70款数百万台笔记本电脑
2021-9-22
Unity Shader学习(五)鼠标移动方块
为什么要引入线程?
三星宣布完成5纳米EUV工艺研发:性能提高10%,功耗降低20%!
Leetcode breaks the 8W mark
华为P30 Pro拆解:结构紧凑做工精细,核心器件供应商曝光!
HBuilderX 格式化 不換行(import)