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.

Menu