Home > Web Front-end > uni-app > body text

How to use uniapp

coldplay.xixi
Release: 2021-01-15 18:16:56
Original
11344 people have browsed it

How to use uniapp: First, developers need to download and install HBuilderX; then create a project directory and create a page; then configure the page and tabbar; and finally run it.

How to use uniapp

The operating environment of this tutorial: windows7 system, uni-app2.5.1 version, thinkpad t480 computer.

Recommended (free): uni-app development tutorial

How to use uniapp:

1. First, developers need to download and install HBuilderX

1) In HBuilderX, click the file in the toolbar->New->Project:

How to use uniapp

2) Select uni-app, enter the project name, such as: test, click Create, and uni-app will be successfully created

How to use uniapp

2. Project directory

How to use uniapp

3. Create page

How to use uniapp

4. Page and tabbar configuration

{
    "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
        {
            "path": "pages/index/index",
            "style": {
                "navigationBarTitleText": "uni-app"
            }
        },
        {
            "path": "pages/homework/homework",
            "style": {
                "navigationBarTitleText": "uni-app"
            }
        },
        {
            "path": "pages/personal/personal",
            "style": {
                "navigationBarTitleText": "uni-app"
            }
        }
    ],
    "globalStyle": {
        "navigationBarTextStyle": "black",
        "navigationBarTitleText": "uni-app",
        "navigationBarBackgroundColor": "#F8F8F8",
        "backgroundColor": "#F8F8F8"
    },
    "tabBar": {
    "color": "#C3B8B4",
    "selectedColor": "#F76605",
    "borderStyle": "white",
    "backgroundColor": "#fff",
    "list": [
      {
        "pagePath": "pages/index/index",
        "text": "学员",
        "iconPath": "static/indexNormal.png",
        "selectedIconPath": "static/indexActive.png"
      },
      {
        "pagePath": "pages/homework/homework",
        "text": "作业",
        "iconPath": "static/homeworkNormal.png",
        "selectedIconPath": "static/homeworkActive.png"
      },
      {
        "pagePath": "pages/personal/personal",
        "text": "我的",
        "iconPath": "static/personalNormal.png",
        "selectedIconPath": "static/personalActive.png"
      }
    ]
  }
}
Copy after login

5. Run

How to use uniapp

6 .Operating renderings

How to use uniapp

##Related free learning recommendations:

Programming video

The above is the detailed content of How to use uniapp. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template