Vue a list of requirements scenario questions

now
switching between different records will have different arrays, such as
clipboard.png

.

I think of two methods
(1) I first get five types of records through the interface, put them in five arrays of data, and assign values to the arrays to be rendered by clicking

.

(2) when I click, I call the API to get the corresponding data, and then assign values to the array to be rendered

which plan is better, ladies and gentlemen?

Mar.01,2021

you can use both methods

allow me to ask who does the paging? Front end? back end? How many pieces of data are there in one more time? Confirm these before choosing the solution

you can say anything now


Let's look at business requirements

if you have high requirements for timeliness and request efficiency, you can get the results when you click, and cache the results in memory. The second click gives priority to the cached results, and provides a button to force updates

.

second category:
1. Avoid unnecessary data requests and reduce http requests
2. The timeliness of the data avoids the modification of the data server, and the client response is not timely


is generally the second, ensuring real-time

Menu