In vue, how do I set up a function to be executed as soon as the page is loaded?

italic text
this is the js code for a page of article details. I would like to ask how to define a function that will be executed as soon as I jump to this page?


ide/instance.html-sharp%E7%94%9F%E5%91%BD%E5%91%A8%E6%9C%9F%E5%9B%BE%E7%A4%BA" rel=" nofollow noreferrer "> vue instance life cycle

is first executed in beforeCreate , and is at the same level as mounted

.

just write in created


usually the functions that need to be executed as soon as the page is loaded are put in created, but for specific analysis, you can refer to the upstairs documentation to understand the lifecycle usage scenario and then make a decision


lifecycle and routing processing can be done.
phases such as created for lifecycle, and navigation guards for
routing.


Lifecycle your requirements are usually written into created

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1bddb9c-52a3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1bddb9c-52a3b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?