Layui的tab选项卡切换时数据表格加载异常

<div class="layui-container">
        <br>
        <div class="layui-row">
            <div class="layui-col-md2">
                <div class="layui-form-item">
                    <span>分润:span>
                div>
                <div class="layui-form-item">
                    <span style="color: red">基数计算span>
                div>
            div>
            <div class="layui-col-md10">
                <table id="demo18" lay-filter="demo18">table>
                <table id="demo19" lay-filter="demo19">table>
            div>
        div>
    div>
    let table18 = table.render({
     
        elem: '#demo18'
        , cols: demo18
        , data: []
    });
    let table19 = table.render({
     
        elem: '#demo19'
        , cols: demo19
        , data: []
    });


    element.on('tab(docDemoTabBrief)', function (elem) {
     
        table18.resize('demo18');
        table19.resize('demo19');
    });

你可能感兴趣的:(经验谈,layUI)