Implement Custom Button Component
This article introduces the implementation of compatible components, adapted for both Mini Program components and Web components, which can be used cross-platform.
If only adapted for a single platform (Mini Program or Web), it can only be used on that single platform.
Quick Start
To help developers understand how to develop custom components and better build richer low-code applications, we provide a Custom Component Example Repository containing some common component examples for reference.
You can quickly get started through the following methods:
# 1. Clone the custom component example repository to local
git clone https://github.com/1225zhangqian/weda-custom-components.git
# 2. Enter the project directory and install dependencies
cd weda-custom-components
npm install
# 3. Quickly create a new component via command
npm run new
Preparation
Refer to the Create Your First Component Library documentation to complete:
- Create cloud component library
- Associate local component library
Step 1: Edit Component Library Configuration
Refer to the Component Library Configuration documentation to edit the configuration.
Step 2: Edit Component Configuration
Refer to the Component Configuration documentation to edit the configuration.
Step 3: Edit Mini Program Component Source Code
Refer to the Mini Program Component Source Code documentation to edit the source code.
Step 4: Edit Web Component Source Code
Refer to the Web Component Source Code documentation to edit the source code.
Step 5: Debug Component
Components do not support individual debugging yet.
Refer to the Create Your First Component Library documentation to debug components using the Debug Local Component Library capability.
Step 6: Publish Component
Components do not support individual publishing yet.
Refer to the Create Your First Component Library documentation to publish components using the Publish Local Component Library and Publish Cloud Component Library capabilities.