当前位置:网站首页>小程序项目结构
小程序项目结构
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文件(配置小程序页面是否允许微信索引)
边栏推荐
- After 95, Alibaba P7 published the payroll: it's really fragrant to make up this
- Is it safe for CICC fortune to open an account online?
- How to choose a good external disk platform, safe and formal?
- 微信小程序正则表达式提取链接
- How to retrieve the root password of MySQL if you forget it
- Notes on key vocabulary in the English original of the biography of jobs (12) [chapter ten & eleven]
- 【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
- sun. misc. Base64encoder error reporting solution [easy to understand]
- ICTCLAS word Lucene 4.9 binding
- Unity editor extended UI control
猜你喜欢

leetcode刷题:二叉树10(完全二叉树的节点个数)

基础篇——配置文件解析

kubernetes资源对象介绍及常用命令(五)-(ConfigMap&Secret)

Guidelines for application of Shenzhen green and low carbon industry support plan in 2023

leetcode刷题:二叉树12(二叉树的所有路径)

微信小程序正则表达式提取链接

【数字IC验证快速入门】7、验证岗位中必备的数字电路基础知识(含常见面试题)

Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)

Unity编辑器扩展 UI控件篇

Go language | 02 for loop and the use of common functions
随机推荐
Zero cloud new UI design
Go language learning tutorial (XV)
解决Thinkphp框架应用目录下数据库配置信息修改后依然按默认方式连接
信息学奥赛一本通 1337:【例3-2】单词查找树 | 洛谷 P5755 [NOI2000] 单词查找树
leetcode刷题:二叉树13(相同的树)
Enter the parallel world
When JS method passes long type ID value, precision loss will occur
leetcode刷题:二叉树10(完全二叉树的节点个数)
14. Users, groups, and permissions (14)
[quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
【数字IC验证快速入门】1、浅谈数字IC验证,了解专栏内容,明确学习目标
基金网上开户安全吗?去哪里开,可以拿到低佣金?
leetcode刷题:二叉树15(找树左下角的值)
What is PyC file
什么是pyc文件
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,
1: Citation;
mongodb/文档操作
Leetcode: binary tree 15 (find the value in the lower left corner of the tree)
【数字IC验证快速入门】8、数字IC中的典型电路及其对应的Verilog描述方法