Engineering structure and page management
The engineering structure of uni-app has individual requirements, see details
Each displayable page must be registered in pages.json . If you have developed small programs, pages.json is similar to app.json. If you are familiar with vue, there is no vue routing here, all are managed in pages.json.
The home page of the original project is usually index.html or default.html, which is allocated in the web server. The homepage of uni-app is configured in pages.json, and the first page under the page node is the homepage. Generally in the / pages / xx directory.
In apps and applets, in order to improve the experience, the page provides a native navigation bar and bottom tabbar. Note that these configurations are done in pages.json, not created in the vue page, but the click event monitoring is displayed on the displayed vue page Do it.
In vue, the previous js 事件监听
concept was changed to a 生命周期
concept. See uni-app life cycle for details
If you are familiar with applet development, the comparison changes are as follows:
- It turned out that app.json was split into two. Page management, moved into uni-app pages.json; non-page management, moved into manifest.json
- The original app.js and app.wxss are merged into app.vue