小程序中自定义组件(component)的使用

1 在根目录下建 components 文件夹,建 组件名称 文件夹,右键,新建component

2. 完善组件内容

3.在要使用的页面*.json中引入注册 

 官网地址:https://developers.weixin.qq.com/miniprogram/dev/reference/api/Component.html#properties-%E5%AE%9A%E4%B9%89

猜你喜欢

转载自blog.csdn.net/weixin_59128282/article/details/119633610