javascript - How to trigger watch during vue initialization
三叔
三叔 2017-07-05 10:57:55
0
1
1062


How to trigger this watch event in created

三叔
三叔

reply all(1)
ringa_lee

Convert the method of consideration from [how to trigger this event in created] to [how to encapsulate this logic and then trigger it in created], and you will have the answer:

  1. Encapsulate the logic in watch into a function in methods.

  2. Call the methods function in created.

In this way, the requirements are achieved without losing reusability.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template