for example, I have a request on the page, which may have a large amount of data or very small. I want to have a loading state when the amount of data is large, and if the amount of data is small, there is no loading state. Load
directly because in actual development, if we do not make this judgment, when the amount of data is small, the loading will end instantly and flash on the page, which is very bad for the user experience.
at present, the method we adopt is one-size-fits-all. Each load has a minimum Loading,loading time of 1 second. If the amount of data is large, the loading time will be extended.
what should I do if I want to do loading processing based on the time the data is returned?