/**Layui分页类说明
 * @parameter 传递的参数{}，参数如下：
 ** elem: "", // 绑定元素，(必填项) 指向容器选择器 类型（ string / object）
 */
class lay_page {
    constructor(parameter = {}) {
        this.parameter = parameter;
        let that = this;
        layui.use(['laypage'], function () {
            var page = layui.laypage;
            // 为了规范ID的同时兼容layui，去掉id的#
            let elem = that.parameter.elem;
            if (/^#/.test(elem)) {
                that.parameter.elem = elem.replace(/#/, "");
            }
            that.page = page.render(that.parameter);
        });
    };
    /**
     * 评分类的参数提示
     */
    static config = {
        elem: "elem",
        count: "count",
        limit: "limit",
        limits: "limits",
        curr: "curr",
        groups: "groups",
        prev: "prev",
        next: "next",
        first: "first",
        last: "last",
        layout: "layout",
        theme: "theme",
        hash: "hash",
        jump: "jump",
    };
    static layout = {
        count: "count",
        prev: "prev",
        page: "page",
        next: "next",
        limit: "limit",
        refresh: "refresh",
        skip: "skip"
    }
};

export default lay_page;