Business scenario: Click the popup window to load the data of the first button by default. Vue custom directives directives implement this requirement

directory

 

Click all buttons automatically.

Automatically click the first button,


Click all buttons automatically.

                 <ul class="areaList">
				    <li
					  :class="{'active': index
Copy the code