[Tutorial] Add loading icon before loading layui data table

The effect is as follows:

image.png

Add loading icon before data table rendering

var index = layer.load(2); //添加loading,0-2三种方式

Among them, there are three styles of loading icons, as shown below:

image.png    image.png     image.png

Add done to the layui data table, the callback after the data table is rendered, please refer to the official document:  https://www.layui.com/doc/modules/table.html#done

,done:function (res) {   //返回数据执行回调函数
    layer.close(index);    //返回数据关闭loading		    	
}


Guess you like

Origin blog.csdn.net/hifhf/article/details/107311594