table of Contents
Define event
In the previous article, we introduced the basic effects of the navigation component, but only defined the data, and the specific switching effects have not yet been achieved. In this section, we introduce how to click the category to switch the category tab.
Open the low-code console, select the navigation component, and click low-code edit.
Find the page where you need to create a method, and click the + sign of the handler to create a method, which is defined as the onClickSidebar
method body and copy the following code
$page.dataset.state.selectedType = event.detail.data.target
Then switch to the event tab and select the method just defined
. After you have selected it, you can click on math, and the tab will switch to math