Current location - Recipe Complete Network - Complete cookbook - Excuse me, how to realize the function display of menu-commodity page in small program?
Excuse me, how to realize the function display of menu-commodity page in small program?
The effect display activates the first item by using the set value of the circulating container, and at the same time, it is configured to click to activate one item, so as to realize the function of clicking the menu to display different commodity contents.

Note: In the data center, you can create data tables of your own applications. The types of data tables are divided into user table, commodity table, order table and user-defined table.

Click Data Center.

Create data table: commodity classification.

The field contains: Category name.

Click Data Center.

Create data table: commodity.

Fields include: commodity name, commodity picture and commodity classification.

Wherein the commodity classification field list is associated with the commodity classification table.

Creating Events Note: Events are abstract logic that links data with interface element components, and data tables are connected with interface element components through events.

Click Event Center.

Create Query Event: Query Classification.

Add a successful response interface.

Click Event Center.

Create an event: query goods.

Trigger Configuration Note: Create a trigger in the trigger setting panel of the inspector panel, which can set the components in the interactive logic or perform dynamic data operation with events.

Select a recycling container.

Click the trigger panel in the inspection panel.

Create Trigger: Set Value. By default, the first item is the active item.

Check the flow layout list.

Click the trigger panel in the inspection panel.

Make a trigger: get the goods.

Select a recycling container.

Click the trigger panel in the inspection panel.

Make a trigger: get the goods.

Select the list entry for the loop container.

Click the trigger panel in the inspection panel.

Create trigger: activate.

Select a recycling container.

Click the trigger panel in the inspection panel.

Create trigger: query commodity classification.

Select a recycling container.

Click the trigger panel in the inspection panel.

Create Trigger: Deactivate.

Select the label text on the circular container list entry.

Click the trigger panel in the inspection panel.

Create Trigger: Switch Menu.

Binding data Note: Binding data can bind the data returned by the event with the display content of the component.

Select the list entry for the loop container.

Click Data Binding and Settings in the Inspection Panel.

Binding data.

Select the list entry for the Streaming Layout component.

Click Data Binding and Settings in the Inspection Panel.

Binding data.