Vue.js v-for loops two items at a time, and the processing functions in it will be called repeatedly.

what I"m going to implement now is that v-for loops by pressing 2 items at a time, in which there are functions that deal with index, but there will be repeated calls to index in accordance with the situation.
template:
clipboard.png
scrip:


:

clipboard.png
does anyone have the same problem? The result I want is that the printed index is either repeated or executed once.

Apr.05,2021

extract this paragraph separately to verify and exclude


caused by other logical problems. The reason is that it should be caused by the render of vue. It should be because I changed the totalPage in mouted to re-render p, and there are useful functions in p, so it was executed again to change the setting of totalPage to 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-1b40a51-2c525.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-1b40a51-2c525.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?