当前位置:网站首页>小程序纪录
小程序纪录
2022-07-26 09:22:00 【~轻舟~】
今天根据千峰视频学习的微信小程序中的flexbox弹性魔盒模型
这个其实是跟iOS 有了太大的区别 我们在做iOS开发的时候做这种操作呢 你可以用xib去拖 挺简单的
也可以用masonry去设置 还可以直接根据frame去设置 有一点就是他们在初始化的时候就将位置固定好了,但是微信小程序不是,他是初始化是一个地方设置位置又是一个地方,并且是设置的该控件的四周(其实也和iOS差不多吧 只是不太习惯),其实还是挺方便的。
另外iOS和微信小程序的命名规则也是不太一样,这个也是习惯的问题。控件后面跟的class就是控件的名称然后在wxss中设置控件的位置大小。且微小的控件会自动按照你写的顺序依次往下排列,根据你写的间距设置控件的具体位置。所以控件的先后顺序在微小中显得特别重要。
再往下做的是事件的交互
可能之前没接触过前段吧,感觉很不舒服,在iOS中也是在初始化的时候一并把所有操作全部执行,微信小程序要做操作是在js中执行数据处理,在wxml中设置要添加的方法。
要判断不同控件之间的点击用的是currentTarget中的id data-xxx 之类的来区别
wxml
![]()
js
![]()
边栏推荐
- Zipkin installation and use
- 会议OA项目(三)---我的会议(会议排座、送审)
- Unity topdown character movement control
- Stm32+mfrc522 completes IC card number reading, password modification, data reading and writing
- Pat grade a a1013 battle over cities
- The child and binary tree- open root inversion of polynomials
- redis原理和使用-基本特性
- What is the difference between NFT and digital collections?
- CF1481C Fence Painting
- Under a directory of ext3 file system, subfolders cannot be created, but files can be created
猜你喜欢

Redis principle and use - Basic Features

原根与NTT 五千字详解

Summary of common activation functions for deep learning

Voice chat app source code - Nath live broadcast system source code

Nuxt - Project packaging deployment and online to server process (SSR server rendering)

Stm32+mfrc522 completes IC card number reading, password modification, data reading and writing

Does volatile rely on the MESI protocol to solve the visibility problem? (next)

异常处理机制二

分布式跟踪系统选型与实践

Li Mu D2L (IV) -- softmax regression
随机推荐
Go intelligent robot alpha dog, alpha dog robot go
【线上死锁分析】由index_merge引发的死锁事件
[MySQL] how to execute an SQL statement (2)
Pat grade a A1034 head of a gang
模板(三)
【Flutter -- 布局】Align、Center、Padding 使用详解
对象型的集合按某个属性的值进行去重
Local cache
2022 tea artist (intermediate) special operation certificate examination question bank simulated examination platform operation
李沐d2l(六)---模型选择
Li Mu D2L (V) -- multilayer perceptron
分布式跟踪系统选型与实践
2B and 2C
C# Serialport的发送和接收
PHP 之 Apple生成和验证令牌
What is the difference between NFT and digital collections?
Voice chat app source code - Nath live broadcast system source code
Study notes of canal
Canal 的学习笔记
语音聊天app源码——钠斯直播系统源码