Progress Bar
WdProgress
Applicable Scenarios
A progress bar that indicates the current progress, such as file upload progress, audio playback progress, etc.
Extended Scenarios Description
Step Size
Example
Configure a progress bar with a step size of 20.
Configuration Method
In the Scoring Attributes Area - Basic Properties - Numerical Adjustment Step Size, enter 20 as the target step size. Then click the progress bar in the editor area to verify.
Example
Interactive Preview
Clickable and Draggable Progress Bar
Properties
External properties received by the component
Property Name | Property Identifier | Type | Description |
|---|
| Display progress percentage | showPercent | boolean | |
| Minimum value | min | number | 0 |
| Maximum value | max | number | Default value: 100 |
| Adjust step size | step | number | Control the value to add/decrease with each click of the adjust button Default value: 1 |
| Display Headlines | labelVisible | boolean | Default value: true |
| Title alignment | labelAlign | string | In the scenario, the form by default follows the title alignment configuration of the form container. |
| Line break in heading | labelWrap | boolean | If the title content is too long when closed, show one line with overflow omitted; when enabled, show with line breaks. In form scenarios, it follows the form container's title line break configuration by default. |
| Title position | layout | string | Set title display position in form component. In the scenario, it follows the title position configuration of the form container by default. |
| Title width | labelWidth | string | In the scenario, the form follows the title width configuration of the form container by default. |
| Heading Note | labelTips | string | Configure tooltip content for the heading |
| Required | required | boolean | Enable required for this component, value cannot be empty |
| Required identifier | requiredFlag | boolean | Enabled, the component will display a required asterisk tag if mandatory. Default value: true |
| Required validation note | requiredMsg | string | Enable required, prompting message when component value is empty Default value: "该项为必填项" |
| Status. | status | string | Default value: "edit" |
| Bound field | name | string | The Key of the form field is used to match the field identifier of the data model when submitting data. Ensure uniqueness inline. |
| Title content. | label | string | Example: "标题" |
| progress value | value | number |
Events
Events exposed by the component. You can listen to component events to trigger external actions
Event Name | Event Code | Event Output Parameters event.detail | Applicable Scenarios | Description |
|---|
| value change | change | object
| Compatible with all platforms | - |
Property API
Through the Property API, you can access the internal state and property values of components. You can access internal values using$w.componentId.propertyName, such as $w.input1.value. For details, please refer to Property API
Read-only Property Name | Property Identifier | Type | Description |
|---|
| Bound field | name | string | The Key of the form field is used to match the field identifier of the data model when submitting data. Ensure uniqueness inline. |
| Title content. | label | string | |
| Display progress percentage | showPercent | boolean | |
| Minimum value | min | number | |
| Maximum value | max | number | |
| progress value | value | number | |
| Adjust step size | step | number | Control the value to add/decrease with each click of the adjust button |
| Indicates whether to display | visible | boolean | Whether to display the component |
| Whether to disable | disabled | boolean | Component Disabled |
| Specify whether it is read-only or not. | readOnly | boolean | Whether the component is read-only |
Style API
Through the Style API, you can override the styles of internal elements in components to achieve customization. For example, in the low-code editor, you can write styles for all button components using #wd-page-root .wd-btn, and control individual component styles with :scope. For detailed instructions, please refer toStyle API
Name | Class Name | Description and Examples |
|---|
| root element | .wd-progress-root | Outermost component element |
| PC-side root element | .wd-pc-progress-root | Settable root element style for the PC side |
| H5 root element | .wd-h5-progress-root | Settable root element style for the H5 side |
| Mini program root element | .wd-mp-progress-root | Settable root element style for mini program |
| Component title style | .wd-progress-root .wd-form-item-wrap__label | Component title element |
| Progress bar container element | .wd-progress-container | Can write styles for the progress bar container |
| Progress bar track element | .wd-progress | Write styles for the progress bar track |
| progress bar progress element | .wd-progress__value | Can write styles for the element representing the progress bar's current progress |