当前位置:网站首页>Composition of applet code
Composition of applet code
2022-07-05 20:25:00 【'wx】
1.WXML Templates
WXML and HTML The difference between
(1). Different label names
HTML(div,span,img,a)
WXML(view,text,image,navigator)
(2) Attribute nodes are different
<a href="#"> Hyperlinks </a>
<navigator url="pages/home/home"></navigator>
(3) Offer something similar to vue Template syntax for
Data binding
The list of rendering
Conditions apply colours to a drawing
2.WXSS style
(1) Added rpx Unit of measure , The screen of different sizes will be converted automatically
(2) Provides global and local styles
In the root directory of the project app.wxss Will work on all applet pages
Of partial pages .wxss The style is only valid for the current page
(3)WXSS Only partial css Selectors
Class selector and id Selectors
Element selector
Union selector , Descendant selector
Pseudo class selector
3.JS Logical interaction
(1)app.js
It is the entry file of the whole applet project , By calling App() Function to start the entire applet
(2) Page .js file
Is the entry file of the page , By calling Page() Function to create and access pages
(3) ordinary .js file
It is a common function module file , Used to encapsulate public functions or properties for use by pages
边栏推荐
- 无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...
- 2020 CCPC 威海 - A. Golden Spirit(思维),D. ABC Conjecture(大数分解 / 思维)
- 【c语言】归并排序
- 小程序页面导航
- 如何形成规范的接口文档
- ICTCLAS word Lucene 4.9 binding
- DP: tree DP
- A solution to PHP's inability to convert strings into JSON
- 鸿蒙系统控制LED的实现方法之经典
- Some problems encountered in cocos2d-x project summary
猜你喜欢
随机推荐
[quick start to digital IC Verification] 8. Typical circuits in digital ICs and their corresponding Verilog description methods
[quick start of Digital IC Verification] 1. Talk about Digital IC Verification, understand the contents of the column, and clarify the learning objectives
How to choose a good external disk platform, safe and formal?
Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
Leetcode(695)——岛屿的最大面积
强化学习-学习笔记4 | Actor-Critic
Leetcode brush question: binary tree 13 (the same tree)
19 mongoose modularization
处理文件和目录名
July 4, 2022 - July 10, 2022 (UE4 video tutorial MySQL)
Fundamentals - configuration file analysis
[quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
19 Mongoose模块化
Ros2 topic [01]: installing ros2 on win10
Dry goods navigation in this quarter | Q2 2022
【数字IC验证快速入门】9、Verilog RTL设计必会的有限状态机(FSM)
Rainbond 5.7.1 支持对接多家公有云和集群异常报警
Leetcode skimming: binary tree 17 (construct binary tree from middle order and post order traversal sequence)
document方法