Layui中点击出现tips

$(".nvp").click(function () {
    console.log(this)
    var that = this;
    tips =layer.tips("<div class=\"content_div\" style=\"display: block;\">\n" +
        "        <div style='margin-top: 11px;'><button type=\"button\" class='qushi'>趋势查询</button></div>\n" +
        "        <div style=\"margin-top: 8px;\"><button type=\"button\" class='canshu'>参数监视</button> </div>\n" +
        "    </div>",that,{tips:["1","none"],time:0,area: 'auto',maxWidth:500});
    $(".canshu").click(function () {
        let index = parent.layui.index;
        let url = `${Feng.ctxPath}/EfdOverrunRecord/toQljQueryParamAbnorHis`;
        index.openTab({"title": '参数监视', "url": url})
    });
    $(".qushi").click(function () {
        let index = parent.layui.index;
        let url = `${Feng.ctxPath}/EfdOverrunRecord/toQljTrendQuery`;
        index.openTab({"title": '趋势查询', "url": url})
    })
});
$(document).mouseup(function(e) {
    var _con = $("li"); // 设置目标区域
    if (!_con.is(e.target) && _con.has(e.target).length === 0) {
        layer.close(tips);
    }
});
css
.layui-layer-tips .layui-layer-content{
    background-color: rgba(0,0,0,0)!important;
    padding: 0!important;
}
.layui-layer-TipsG {
    width: 0px !important;
    height: 0px !important;
    background-color: #fff;
    transform: rotate(45deg);
    border-color: #fff !important;
    box-shadow: 0px 3px 10px 0px rgba(143, 140, 140, 0.31) !important;
    border: 1px solid #D8DCE5 !important;
}
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值