当前位置:网站首页>小程序目录结构
小程序目录结构
2022-07-07 12:33:00 【InfoQ】
目录结构

- pages:这个目录下放的就是小程序的页面
- utils:这里面存的都是一些公用的js,提供公共方法减少冗余和维护难度的
- app.js:整个微信小程序相关的全局js,这里有监听整个小程序的生命周期函数和全局变量;
- app.json:是对整个小程序的静态全局配置,我们可以在这个文件中配置小程序是由哪些页面组成(路由),配置小程序的窗口背景色、配置导航条样式,配置默认标题,可以配置整个项目的样式,超时时间,加载的插件等等;(注意该文件不可添加任何注释);
- app.wxss文件:整个小程序的样式文件,针对每个页面的css文件的内容不同,加载到对应页面的css样式时,当前页面的wxss文件会覆盖app.wxss文件(估计跟普通的css样式的覆盖规则类似)。
- project.config.json文件: 这个其实是每个开发者工具生成的项目都有的,但和项目内容实际没有特别大关联,主要是记录相关工具的配置的,在工具上做的任何配置都会写入到这个文件,当重新安装工具或者换电脑工作时,只要载入同一个项目的代码包,开发者工具就自动会帮你恢复到当时你开发项目时的个性化配置,其中会包括编辑器的颜色、代码上传时自动压缩等等一系列选项。
- sitemap.json文件: 这个可以配置是否允许被微信索引,具体看微信官方文档-sitemap 配置
- wxs
- png
- jpg
- jpeg
- gif
- svg
- json
- cer
- mp3
- aac
- m4a
- mp4
- wav
- ogg
- silk
- wasm
- br
- cert
边栏推荐
- Reverse non return to zero code, Manchester code and differential Manchester code of common digital signal coding
- Mrs offline data analysis: process OBS data through Flink job
- 高等數學---第八章多元函數微分學1
- Selenium库
- UML 状态图
- Oracle Linux 9.0 正式发布
- Vscode configuration uses pylint syntax checker
- LeetCode 648. 单词替换
- UML 顺序图(时序图)
- The reason why data truncated for column 'xxx' at row 1 appears in the MySQL import file
猜你喜欢
MRS离线数据分析:通过Flink作业处理OBS数据
docker部署oracle
Flask session forged hctf admin
用例图
Introduction to sakt method
常用數字信號編碼之反向不歸零碼碼、曼徹斯特編碼、差分曼徹斯特編碼
Assign a dynamic value to the background color of DataGrid through ivalueconverter
手把手教会:XML建模
AI talent cultivation new ideas, this live broadcast has what you care about
js 获取当前时间 年月日,uniapp定位 小程序打开地图选择地点
随机推荐
[untitled]
Wired network IP address of VMware shared host
UML sequence diagram (sequence diagram)
3D detection: fast visualization of 3D box and point cloud
oracle 非自动提交解决
Oracle Linux 9.0 正式发布
GVIM [III] [u vimrc configuration]
Laravel Form-builder使用
Selenium Library
SAKT方法部分介绍
Verilog implementation of a simple legv8 processor [4] [explanation of basic knowledge and module design of single cycle implementation]
FC连接数据库,一定要使用自定义域名才能在外面访问吗?
Excuse me, does PTS have a good plan for database pressure measurement?
Advanced Mathematics - Chapter 8 differential calculus of multivariate functions 1
UML state diagram
Interface automation test - solution of data dependency between interfaces
IP address home location query full version
UML 状态图
The difference between memory overflow and memory leak
最长上升子序列模型 AcWing 1012. 友好城市