Use layui framework - digging

layui this framework gave me the feeling that with jq, js's. Not very suitable for combination with vue.

Referring to the official document: https://www.layui.com/doc/

(1) tab can apply filters, using the same multiple pages

Used as follows: to load the data returned by the small scale data.

 

 

 

(2) form a form (to official regulations: Note: If you do not load the form module, select, checkbox, radio, etc. will not be displayed, and you can not use form-related functions).

// Load the form. 
layui.use ( 'form', function () {   var form = layui.form;   form.render (); });

 When this occurs in the initialization tab, the values ​​are not assigned to some form module. Solution:

In the initialization value when acquired, added:

the setTimeout (() => { 
// refresh the form 
	var form = layui.form; 
	form.render (); 
}, 500);

 Asynchronous load, given a certain time buffer.

This problem also occurs when you call Baidu map api here:

Error: gc .....

Means substantially not loaded into the container. Asynchronous into it.

 

Guess you like

Origin www.cnblogs.com/Arthur123/p/12508010.html