Development of the homepage of the training applet

Let's develop the homepage of our small program in this article, first look at the prototype
insert image description here

1 Define variables

Because of the classification information displayed on our homepage, the classification information has been stored in the data source now, and we need to read it out through variables.

First open the custom application we created, click New in the code area to create a data table query,
insert image description here
select the category for the data table, and select the query list for the method
insert image description here

2 Greeting construction

After the variables are defined, it is necessary to consider the component construction. For the page, we add a background image to the head, and the middle part is displayed in the form of icons and text.

I want to add an ordinary container as the background,
insert image description here
set the height to 250px, and the background to the image background.
insert image description here
Add an ordinary container to place our welcome message, set the height to 149px and
insert image description here
continue to add an ordinary container to display text, and set the inner margin of 40px
insert image description here
Add two text components inside
insert image description here
Modify the content of the text components, set the inner margin of 12px, and set the text format of the first text component to H4
insert image description here

3 category navigation construction

Select the outermost ordinary container and add an ordinary container to place our classification information
insert image description here
Set a certain background color and rounded corners
insert image description here
Continue to add an ordinary container with a width of 94% and an outer margin of auto, so that the ordinary container is displayed in the center
insert image description here

self {
    
    
    width: 94%;
    margin-right: auto;
    margin-left: auto;
    padding-top: 50px;
    padding-right: 7.5px;
    padding-left: 7.5px
}

Add a data list to the normal container, select the classification as the data source, and select the graphic list as the template.
insert image description here
First, simplify the components, only keep the picture and text components,
insert image description here
then remove the border style
insert image description here
, and then bind the background color to the normal container
insert image description here
insert image description here
. Now the components are a bit crowded. Set a little bottom margin
insert image description here

4 Build bottom navigation

On the home page, we need to have a bottom navigation bar, add a tab bar component, and set the label list
insert image description here

Summarize

This article takes everyone to build the homepage, mainly to master the layout of the page and the settings of the data list components. The components of the micro-build already provide a wealth of attributes, and proficiency in the attributes of each component is an essential skill for low-code development.

Guess you like

Origin blog.csdn.net/u012877217/article/details/131555044