Need to show a long list , Just show , No data changes involved , How to optimize performance at this time ？
vue During initialization, it will traverse data Data in , adopt Object.defineProperty() Set... For each data setter and getter Method , This process is very performance intensive .
Since there is no need to change , Then you don't need the data to become responsive , That is, there is no need to let Vue To traverse .
There are two methods available :
1、Object.freeze Freeze objects
2、 Do not place data in data in , It is placed with data/methods/computed At the same level , Then template of use $options To get data .
data and Method section
Synchronize updates to your own language bird