自定义组件 - behaviors(微信小程序学习day29)

2023-12-19  本文已影响0人  扶得一人醉如苏沐晨

1. 什么是behaviors

image.png

2. behaviors的工作方式

image.png

3. 创建 behavior

image.png image.png

4. 导入并使用 behavior

image.png image.png

5. behavior中所有可用的节点

image.png

6. 同名字段的覆盖和组合规则*

image.png

关于详细的覆盖和组合规则,大家可以参考微信小程序官方文档给出的说明:
https://developers.weixin.qq.com/miniprogram/dev/framework/custom-component/behaviors.html

上一篇 下一篇

猜你喜欢

热点阅读