May 18, 2021 WeChat Mini Program Development Document
A customer service session button that displays a customer service session button on the page that the user clicks and enters the customer service session.
The property name | Type | The default | Description |
---|---|---|---|
size | Number | 18 | Session button size, valid value 18-27, in px |
type | String | default-dark | The style type of the session button |
session-from | String | When a user enters a session from this button, the developer receives an event push with this parameter. This parameter can be used to distinguish between the sources from which a user enters a customer service session. |
Type valid value:
Value | Description |
---|---|
default-dark | |
default-light |
The sample code
<contact-button
type="default-light"
size="20"
session-from="weapp"
>
</contact-button>
Related api: See the customer service message interface documentation for details
Related components:
The button
component can also enter a customer service session by setting open-type"contact"