Skip to main content

Mini-program Action Source Code

Mini-program Component Source Code is similar to defining public functions.

Source Code Example

src/mp/actions/showToast/index.js
export default function showToast({ data }) {
wx.showToast(data);
}

Source Code Parameter Description

data

Corresponds to the data field in Action Configuration. After binding events and actions in the Events panel of the low-code editor, users can configure parameters for bound actions, which will be passed through to this field.