The component of .Vue should control the number of lines in which it is more appropriate.

is mainly a matter of best practices.

  1. A .Vue component should control the number of lines of code within which it is appropriate to feel that too much code will affect readability, while excessive splitting will affect efficiency
  1. does everyone"s Data comment on each property individually

would like to ask about your habits and practices

Oct.22,2021

component splitting looks at personal coding habits, such as a tab page, in which those with less content can be written separately in a component, and those with more content can be split to write.
it is also possible to split different components and correspond to their respective template functions. It is recommended that you do not split too many sibling components or parent-child components. It is easy to make mistakes in passing parameters in the components, and the parameters are easy to change and influence each other.

data data need not be annotated separately. For example, loading;
suggests long parameters, which can be annotated separately if you can't see the specific implication at a glance. Some parameters are in an Object, and the code looks confusing, so it's better to comment on them, so it's convenient for later maintenance to read the code and quickly understand

.

We are limited to 200lines. Do not think that the limit is too strict, high-level people can do it, in fact, most documents are only about 100 lines.

Menu