layer弹出层示例

效果图如下:

代码如下:

<link rel="stylesheet" href="../static/thirdparty/layui-v2.4.5/css/layui.css"  media="all">
<script src="../static/thirdparty/layui-v2.4.5/layui.all.js" charset="utf-8"></script>

    <style>
        .a{
            text-align: right;
            font-weight: bold
        }
    </style>
<script>
    layui.use(["layer"], function(){
        var layer = layui.layer;
        // var loading = layer.load(1);
        var content = '<div class="layui-row">\n' +
            '        <div class="layui-col-md4 a">\n' +
            '            申请矿区名称:\n' +
            '        </div>\n' +
            '        <div class="layui-col-md8">\n' +
            '            矿泉水矿\n' +
            '        </div>\n' +
            '    </div>\n' +
            '    <div class="layui-row">\n' +
            '        <div class="layui-col-md4 a">\n' +
            '            矿权类型:\n' +
            '        </div>\n' +
            '        <div class="layui-col-md8">\n' +
            '            勘探\n' +
            '        </div>\n' +
            '    </div>\n' +
            '    <div class="layui-row">\n' +
            '        <div class="layui-col-md4 a">\n' +
            '            矿种:\n' +
            '        </div>\n' +
            '        <div class="layui-col-md8">\n' +
            '            地热\n' +
            '        </div>\n' +
            '    </div>\n' +
            '    <div class="layui-row">\n' +
            '        <div class="layui-col-md4 a">\n' +
            '            申请矿权坐标:\n' +
            '        </div>\n' +
            '        <div class="layui-col-md8">\n' +
            '            ***\n' +
            '        </div>\n' +
            '    </div>\n' +
            '    <div class="layui-row">\n' +
            '        <div class="layui-col-md4 a">\n' +
            '            分析结果:\n' +
            '        </div>\n' +
            '        <div class="layui-col-md8">\n' +
            '            该申请矿权位于xxxx勘探规划区块内,符合规划要求。\n' +
            '        </div>\n' +
            '    </div>';

        layer.open({
            type: 0
            ,title: '分析结果'
            ,content: content
            ,btnAlign: 'c'  // 按钮居中对齐
            ,shade: 0 //不显示遮罩
            ,btn: ['分析报告下载']
            ,yes: function(index, layero){
                layer.close(index);
                console.log("下载成功")
            }
        });

    });


</script>

参考文章

layer弹出层(官网):https://www.layui.com/doc/modules/layer.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值