文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(1)

2.7.2 页面描述文件WXML(WeiXin Markup Language)是一套标签语言,结合基础组件、事件系统,我们可 以构建出页面的结构。整个小程序框架系统包括逻辑层和视图层,逻辑层即为页面逻辑文件 (即 js 文件),视图层主要由页面描述文件(即 wxml 文件)和页面样式文件(即 wxss 文件) 组成。其中,视图层可以将逻辑层的数据反映成视图,同时将视图层的事件发送给逻辑层。 在....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(1)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(2)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(1): https://developer.aliyun.com/article/1228017?groupCode=tech_library2.条件渲染所谓条件渲染是指根据绑定表达式的值来判断是否渲染当前组件,如代码清单 2-32 所示。 代码清单 2-32<!-- 三元运算 --....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(2)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(3)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(2): https://developer.aliyun.com/article/1228016?groupCode=tech_library  3.列表渲染在组件上使用 wx:for 控制属性绑定一个数组,即可使用数组中各项的数据重复渲染该组 件。数组中当前项的下标变量名默认是....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(3)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(4)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(3): https://developer.aliyun.com/article/1228015?groupCode=tech_library4.模板 WXML 提供了模板(template),开发者可以在模板中定义代码片段,然后在不同的地方 调用。首先,我们看定义模板的方法:使用 nam....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(4)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(5)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(4): https://developer.aliyun.com/article/1228014?groupCode=tech_library  5.引用在 wxml 文件中,开发者除直接编写组件本身的代码外,还 可以引用其他页面文件。这样,我们就可以将一些常用的 WXML 代码....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(5)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(6)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(5): https://developer.aliyun.com/article/1227994?groupCode=tech_library  camera 组件属于微信小程序的媒体组件。该组件可以使用系统的相机,如果需要使用扫描 二维码功能,需要将微信客户端版本升级至 6.7....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(6)
文章 2023-05-25 来自:开发者社区

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(7)

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(6): https://developer.aliyun.com/article/1227991?groupCode=tech_library最后,看一个简单的案例,代码清单 2-55 即为 wxml 文件中的代码。代码清单 2-55&lt;canvastype="2d"id="myCan....

《智能前端技术与实践》——第 2 章 前端开发基础 ——2.7 微信小程序开发——2.7.2 页面描述文件(7)
问答 2022-07-29 来自:开发者社区

微信小程序子目录(页面描述文件)有哪些文件?

微信小程序子目录(页面描述文件)有哪些文件?

本页面内关键词为智能算法引擎基于机器学习所生成,如有任何问题,可在页面下方点击"联系我们"与我们沟通。

产品推荐

{"cardStyle":"productCardStyle","productCode":"aliyun","productCardInfo":{"productTitle":"10分钟搭建微信小程序","productDescription":"本方案为您介绍如何在阿里云快速部署博客网站,并将网站服务快速应用到微信小程序。","productContentLink":"https://www.aliyun.com/solution/tech-solution/develop-your-wechat-mini-program-in-10-minutes","isDisplayProductIcon":true,"productButton1":{"productButtonText":"方案详情","productButtonLink":"https://www.aliyun.com/solution/tech-solution/develop-your-wechat-mini-program-in-10-minutes"},"productButton2":{"productButtonText":"方案部署","productButtonLink":"https://help.aliyun.com/document_detail/2856534.html"},"productButton3":{"productButtonText":"查看更多技术解决方案","productButtonLink":"https://www.aliyun.com/solution/tech-solution/"},"productPromotionInfoBlock":[{"$id":"0","productPromotionGroupingTitle":"解决方案推荐","productPromotionInfoFirstText":"高效构建企业门户网站","productPromotionInfoFirstLink":"https://www.aliyun.com/solution/tech-solution/build-a-website","productPromotionInfoSecondText":"从 HTTP 到 HTTPS 让网站更安全","productPromotionInfoSecondLink":"https://www.aliyun.com/solution/tech-solution/ssl"}],"isOfficialLogo":false},"activityCardInfo":{"activityTitle":"","activityDescription":"","cardContentBackgroundMode":"LightMode","activityContentBackgroundImageLink":"","activityCardBottomInfoSelect":"activityPromotionInfoBlock"}}

mPaaS 移动开发平台

mPaaS 源于蚂蚁集团金融科技,为 App 开发、测试、运营及运维提供云到端的一站式解决方案,致力于提供高效、灵活、稳定的移动研发、管理平台。 官网地址:https://www.aliyun.com/product/mobilepaas/mpaas

+关注