Vue toggles the currently displayed components, and the toggle button itself needs to wait for the new component to be rendered before the state is changed.

The basic structure of

is as follows. The button above is used to switch the displayed k-line or its configuration. The k-line below uses echarts, to request data and it will take a certain amount of time to complete the rendering. From the time-sharing button, switch to the 5th button, the background color of the button will change.
the problem is that the change in the background color of the button does not occur until the following curve is drawn.
can you have a solution so that the state of the button changes first, and then the rendering of the following curve is completed asynchronously?
clipboard.png

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