How to improve the Componentialization of Vue

when writing a component, I don"t know whether my logical code should be placed in the component or in its parent component. The method is called through the parent component, and the data is obtained and passed into the child component. The child component is only responsible for rendering the data.

I don"t know which way is better. In other words, in which case which way is better. Is there a boss who can solve my doubts? Thank you ~

Mar.28,2021

if multiple child components use the same method, the method is placed in the parent component.
if a subcomponent only uses a method that only reflects itself, put that method into the subcomponent.
if multiple components (regardless of parents / children) need to use the same method, put the method in a global location for easy use, such as in root/util/commonFunction.js

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