Updated on 2025-03-24 GMT+08:00

Configuration Item Overview

This section describes the widget configuration items supported by Huawei Cloud Astro Canvas. You can define the widget type and configuration using the type field defined in the {widget}.editor.js file.

Table 1 Configuration item overview

Category

Type

Description

Input box

input

Single-line text box

textarea

Multi-line text box

Number

input-number

Counter

slider

Slider

Exchange

tab

Tab

switch

Switch

radio

Single-choice

checkbox

Multi-choice

Color

colorpicker

Color picker

Date and time

time

Time picker

Drop-down list

select

Drop-down selection

Loop

list

Loop

config Configuration Example

The following is an example of the config configuration. The configuration effect is shown in Figure 1.

{
      migrateFrom: 'advancedSettings',
      headerTitle: { zh_CN: 'Data Mapping', en_US: 'Data Mapping' },
      belong: 'configuration',
      config: [
        {
          type: 'select',
          name: 'commonProps.emphasisFocus',
          label: { zh_CN: ''Emphasis Focus', en_US: 'Emphasis Focus' },
          value: 'series',
          options: [
            {
              label: { zh_CN: 'None', en_US: 'None' },
              value: 'none',
            },
            {
              label: { zh_CN: 'Self', en_US: 'Self' },
              value: 'self',
            },
            {
              label: { zh_CN: 'Series', en_US: 'Series' },
              value: 'series',
            },
          ],
        },
        {
          type: 'tab',
          name: 'commonProps.showLabel',
          label: { zh_CN: 'Emphasis Focus', en_US: 'Emphasis Focus' },
          value: true,
          options: [
            {
              label: { zh_CN: 'Show', en_US: 'Show' },
              value: true,
            },
            {
              label: { zh_CN: 'Hide', en_US: 'Hide' },
              value: false,
            },
          ],
        },
      ],
    },
Figure 1 Effect