layui.define(['jquery',], function (exports) {
    var $ = layui.jquery;
    
    //浮动提示
    setTimeout(function () {
        $(".cmspro-tips").hover(function () {
            let loc;
            let colour;
            const info = $(this).data("info");
            const data_colour = $(this).data("colour");
            const data_loc = $(this).data("loc");
            const data_id = $(this).data("id");
            if (data_colour == null) {
                colour = "#000";
            } else {
                colour = data_colour;
            }
            if (data_loc == null) {
                loc = 1;
            } else {
                loc = data_loc;
            }
            if (data_id == null) {
                layer.tips(info, this, {
                    tips: [loc, colour],
                    maxWidth: 360,
                    time: 0
                });
            } else {
                layer.tips(info, "#" + data_id + "", {
                    tips: [loc, colour],
                    maxWidth: 360,
                    time: 0
                });
            }
        }, function () {
            layer.closeAll('tips');
        });
    }, 100);
    exports('cmspro', {});
});