There are too many lines of vue single file code, how to optimize it

when using vue to develop single-page applications, we often encounter thousands of lines of .vue file code, and on the premise that the reusable components are extracted, I think it is difficult to maintain too many lines of code, so it takes a long time to find the scroll bar. As shown in the figure:

the above page, template+script has more than 1400 lines, it is very troublesome to find a place.
in this case, I have an idea: use vue"s mixin, to write the js of every part of the business logic into mixin. But I don"t know if this is good or not, or is there any other way?

Oct.15,2021

extract the script code of the vue file into a separate js file

test.vue

  

I will modularize each function, each component has a single function, and UI style, pay attention to storage.

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-1b32c9a-2be4b.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-1b32c9a-2be4b.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?