vue initialization data table, the data flash problem

 

iview use, it is simply a table, can be expanded to display, I am here it is to change a little, but also display the form, content detail data.

 

 

 I thought very simple method can be called directly, rendering the data, but did not expect data only fleeting.

Yeah puzzling

F12 ---- Yeah data is there

Baidu ---- did not find the correct answer (probably because I'm just getting started, more vegetables)

Supposed ......

Think created is called before rendering the template into html, and then rendered into view.

Then I guess is not in've got the data, but also rendering, but page rendering speed is slower than the rendering data, resulting in data being washed off

Consequently, I think of a way, created in, call the setTimeout, 500 time (0.5 seconds) after the call to the data acquisition interface.

Successful, Sahua * ★, ° * :. ☆ (¯ ▽ ¯) / $:. * ° ★ *. .

 

 

But this approach is not particularly good feeling, like a dishonest like, there is a small wooden told my partner to spare other way to die, grateful.

(I am just a beginner, so I do not know this method is right, although to achieve a functional, but a little scared ......)

 

 

Guess you like

Origin www.cnblogs.com/1234w/p/11275598.html