zoukankan      html  css  js  c++  java
  • 微信小程序(2)——新建页面

    在当前版本中,我们可以快速的新建并且新建页面。

    在app.json文件中输入

    {
      "pages":[
        "pages/index/index"
      ]
    }

    输入"pages/index/index" 后,小程序的编辑工具会自动在根目录建立

      pages文件夹

      index文件夹

      index命名的.js  .json  .wxss  .wxml 文件

     

     app.json介绍


     app.json是每个小程序必有切唯一的。

     使用app.json文件来对微信小程序进行全局配置,决定页面文件的路径、窗口表现、设置网络超时时间、设置多 tab 等。

    app.json 配置项列表

    属性类型必填描述
    pages String Array 设置页面路径
    window Object 设置默认页面的窗口表现
    tabBar Object 设置底部 tab 的表现
    networkTimeout Object 设置网络超时时间
    debug Boolean 设置是否开启 debug 模式
    {
      "pages": [
        "pages/index/index",
        "pages/logs/index"
      ],
      "window": {
        "navigationBarTitleText": "Demo"
      },
      "tabBar": {
        "list": [{
          "pagePath": "pages/index/index",
          "text": "首页"
        }, {
          "pagePath": "pages/logs/logs",
          "text": "日志"
        }]
      },
      "networkTimeout": {
        "request": 10000,
        "downloadFile": 10000
      },
      "debug": true
    }

     

  • 相关阅读:
    QT1 HelloWorld
    SDL2.0 播放YUV
    vim寄存器
    Makefile模板
    apue初学--DIR
    apue初学--平台的判断
    各种推导式
    文件操作
    list tuple dict set
    字符串和编码
  • 原文地址:https://www.cnblogs.com/isdxh/p/7215235.html
Copyright © 2011-2022 走看看