Mini Program Sharing
Share
Usage Instructions
The Mini Program Sharing Component enables quick implementation of sharing functionality. When clicked in the Mini Program, it shares the page based on the current component configuration. The usage is as follows:
Please confirm that the selected application supports mini-program-side building. For specific operations, refer to Create Application Guide.
Add the Mini Program Sharing component to the editing area, and configure the sharing parameters in the right configuration panel.
- After publishing the application to the Mini Program, you will see that clicking the Mini Program sharing button automatically invokes the share pop-up, with the sharing information matching the configuration in the configuration panel.

Component Usage Limitations
- The component must be used in a real Mini Program environment to observe the actual effect.
Properties
组件接收的外部传入的属性
属性名 | 属性标识 | 类型 | 说明 |
---|
按钮标题(小程序) | text | string | 按钮组件的标题 示例:"小程序分享" |
按钮风格(小程序) | type | string | 按钮组件的风格,相对于普通按钮组件,新增“微信”按钮风格 示例:"wechat" |
按钮大小(小程序) | size | string | 按钮的大小 示例:"default" |
分享标题(小程序) | title | string | 分享(转发)卡片的标题 示例:"" |
分享图片(小程序) | image | string | 分享(转发)卡片的图片 示例:"" |
选择页面 | path | string | 选择分享(转发)的页面 |
携带参数 | withParams | boolean | 分享(转发)的页面path是否携带参数 示例:false |
参数 | params | array | 分享(转发)的页面的参数,会自动获取到当前选择页面内存在的页面参数并自动根据页面参数进行展开,当用户通过转发的链接进入小程序时,页面便会按照配置的参数进行渲染。如果采用绑定数据的方式,数据格式参考如下:[{key: 'paramKey1', value: 'paramValue1'}, {key: 'paramKey2', value: 'paramValue2'}] 示例:[] |