当前位置:网站首页>小程序项目结构
小程序项目结构
2022-07-05 20:19:00 【'wx】
每个页面由4个基本文件组成,分别是:
1..js文件(页面的脚本文件,存放页面的数据、事件处理函数等)
2..json文件(当前页面的配置文件,配置窗口的外观、表现等)
3.wxml文件(页面的模板结构文件,类似于html文件)
4.wxss文件(当前页面的样式表文件,类似于css)
1.app.json
{
"pages":[
"pages/home/home",
"pages/message/message",
"pages/contact/contact",
"pages/info/info"
],
"window":{
"backgroundTextStyle":"light",
"navigationBarBackgroundColor": "#fff",
"navigationBarTitleText": "Weixin",
"navigationBarTextStyle":"black"
},
"style": "v2",
"sitemapLocation": "sitemap.json",
"usingComponents": {
"my_test11":"/components/test/test",
"my_test2":"/components/test2/test2",
"my_test3":"/components/test3/test3",
"my_test4":"/components/test4/test4"
}
}
4个配置项作用:
1.pages:用来记录当前小程序所有页面的路径
2.window:全局定义小程序的页面背景色,文字颜色等
3.style:全局定义小程序组件所使用的样式版本
4.sitemaoLocation:用来指明sitemap.json的位置
2.project.config.json文件( 用来记录我们对小程序开发工具所做的个性化配置)
setting 中保存了编译相关的配置
projectname 中保存的是项目名称
appid 中保存的是小程序的账号 ID
3.sitemap.json文件(配置小程序页面是否允许微信索引)
边栏推荐
- Debezium series: modify the source code to support drop foreign key if exists FK
- sun. misc. Base64encoder error reporting solution [easy to understand]
- Guidelines for application of Shenzhen green and low carbon industry support plan in 2023
- Station B up builds the world's first pure red stone neural network, pornographic detection based on deep learning action recognition, Chen Tianqi's course progress of machine science compilation MLC,
- Four methods of random number generation | random | math | threadlocalrandom | securityrandom
- A solution to PHP's inability to convert strings into JSON
- 银河证券在网上开户安全吗?
- 物联网智能家居基本方法实现之经典
- Leetcode brush questions: binary tree 18 (largest binary tree)
- ICTCLAS word Lucene 4.9 binding
猜你喜欢
【数字IC验证快速入门】3、数字IC设计全流程介绍
鸿蒙系统控制LED的实现方法之经典
基础篇——配置文件解析
After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
Wechat applet regular expression extraction link
Jvmrandom cannot set seeds | problem tracing | source code tracing
计算lnx的一种方式
关于BRAM IP复位的优先级
Let's talk about threadlocalinsecurerandom
走入并行的世界
随机推荐
Oracle tablespace management
[C language] merge sort
Debezium series: PostgreSQL loads the correct last submission LSN from the offset
Schema和Model
物联网智能家居基本方法实现之经典
零道云新UI设计中
sort和投影
Introduction to dead letter queue (two consumers, one producer)
炒股开户最低佣金,低佣金开户去哪里手机上开户安全吗
Go language | 01 wsl+vscode environment construction pit avoidance Guide
ffplay文档[通俗易懂]
How to select the Block Editor? Impression notes verse, notation, flowus
Go language | 03 array, pointer, slice usage
mongodb文档间关系
CTF逆向基础
Sort and projection
Leetcode skimming: binary tree 12 (all paths of binary tree)
[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
【c语言】归并排序
USACO3.4 “破锣摇滚”乐队 Raucous Rockers - DP