blockly json toolbox配置

超长的json

{
  "kind": "categoryToolbox",
  "contents": [
    {
      "kind": "category",
      "name": "%{BKY_CATLOGIC}",
      "colour": "%{BKY_LOGIC_HUE}",
      "contents": [
        {
          "kind": "block",
          "type": "controls_if"
        },
        {
          "kind": "block",
          "type": "logic_compare"
        },
        {
          "kind": "block",
          "type": "logic_operation"
        },
        {
          "kind": "block",
          "type": "logic_negate"
        },
        {
          "kind": "block",
          "type": "logic_boolean"
        },
        {
          "kind": "block",
          "type": "logic_null"
        },
        {
          "kind": "block",
          "type": "logic_ternary"
        }
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_CATLOOPS}",
      "colour": "%{BKY_LOOPS_HUE}",
      "contents": [
        {
          "kind": "block",
          "type": "controls_repeat_ext",
          "values": {
            "TIMES": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 10
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "controls_whileUntil"
        },
        {
          "kind": "block",
          "type": "controls_for",
          "values": {
            "FROM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            },
            "TO": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 10
              }
            },
            "BY": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "controls_forEach"
        },
        {
          "kind": "block",
          "type": "controls_flow_statements"
        }
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_CATMATH}",
      "colour": "%{BKY_MATH_HUE}",
      "contents": [
        {
          "kind": "block",
          "type": "math_number",
          "fields": {
            "NUM": 123
          }
        },
        {
          "kind": "block",
          "type": "math_arithmetic",
          "values": {
            "A": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            },
            "B": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_single",
          "values": {
            "NUM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 9
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_trig",
          "values": {
            "NUM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 45
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_constant"
        },
        {
          "kind": "block",
          "type": "math_number_property",
          "values": {
            "NUMBER_TO_CHECK": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 0
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_round",
          "values": {
            "NUM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 3.1
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_on_list"
        },
        {
          "kind": "block",
          "type": "math_modulo",
          "values": {
            "DIVIDEND": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 64
              }
            },
            "DIVISOR": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 10
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_constrain",
          "values": {
            "VALUE": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 50
              }
            },
            "LOW": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            },
            "HIGH": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 100
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_random_int",
          "values": {
            "FROM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            },
            "TO": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 100
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "math_random_float"
        },
        {
          "kind": "block",
          "type": "math_atan2",
          "values": {
            "X": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            },
            "Y": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 1
              }
            }
          }
        }
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_CATTEXT}",
      "colour": "%{BKY_TEXTS_HUE}",
      "contents": [
        {
          "kind": "block",
          "type": "text"
        },
        {
          "kind": "block",
          "type": "text_join"
        },
        {
          "kind": "block",
          "type": "text_append",
          "values": {
            "TEXT": {
              "kind": "shadow",
              "type": "text"
            }
          }
        },
        {
          "kind": "block",
          "type": "text_length",
          "values": {
            "VALUE": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_isEmpty",
          "values": {
            "VALUE": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": ""
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_indexOf",
          "values": {
            "VALUE": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{textVariable}"
              }
            },
            "FIND": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_charAt",
          "values": {
            "VALUE": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{textVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_getSubstring",
          "values": {
            "STRING": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{textVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_changeCase",
          "values": {
            "TEXT": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_trim",
          "values": {
            "TEXT": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_print",
          "values": {
            "TEXT": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "text_prompt_ext",
          "values": {
            "TEXT": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": "abc"
              }
            }
          }
        }
      ]
    },
    {
      "kind": "category",
      "name": "%{BKY_CATLISTS}",
      "colour": "%{BKY_LISTS_HUE}",
      "contents": [
        {
          "kind": "block",
          "type": "lists_create_with",
          "mutations": {
            "items": 0
          }
        },
        {
          "kind": "block",
          "type": "lists_create_with"
        },
        {
          "kind": "block",
          "type": "lists_repeat",
          "values": {
            "NUM": {
              "kind": "shadow",
              "type": "math_number",
              "fields": {
                "NUM": 5
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_length"
        },
        {
          "kind": "block",
          "type": "lists_isEmpty"
        },
        {
          "kind": "block",
          "type": "lists_indexOf",
          "values": {
            "VALUE": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{listVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_getIndex",
          "values": {
            "VALUE": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{listVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_setIndex",
          "values": {
            "LIST": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{listVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_getSublist",
          "values": {
            "LIST": {
              "kind": "block",
              "type": "variables_get",
              "fields": {
                "VAR": "{listVariable}"
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_split",
          "values": {
            "DELIM": {
              "kind": "shadow",
              "type": "text",
              "fields": {
                "TEXT": ","
              }
            }
          }
        },
        {
          "kind": "block",
          "type": "lists_sort"
        }
      ]
    },
    {
      "kind": "sep"
    },
    {
      "kind": "category",
      "name": "%{BKY_CATVARIABLES}",
      "colour": "%{BKY_VARIABLES_HUE}",
      "custom": "VARIABLE"
    },
    {
      "kind": "category",
      "name": "%{BKY_CATFUNCTIONS}",
      "colour": "%{BKY_PROCEDURES_HUE}",
      "custom": "PROCEDURE"
    }
  ]
}

ECharts toolbox 是 ECharts 提供的一个工具箱,包含了常用的数据视图、数据区域缩放、动态类型切换、保存图片等功能。以下是 ECharts toolbox 相关配置: 1. `show`:是否显示 toolbox 组件,默认为 true。 2. `orient`:toolbox 组件的布局朝向,可选值为 "horizontal"(水平排列)和 "vertical"(垂直排列),默认为 "horizontal"。 3. `itemSize`:toolbox 组件中每个工具项的尺寸,可以是一个数字或者数组,数组中的两个数字分别表示宽度和高度,默认为 15。 4. `itemGap`:toolbox 组件中每个工具项之间的间距,可以是一个数字或者字符串(如 "20%"),默认为 10。 5. `iconStyle`:toolbox 组件中每个工具项的图标样式,可以设置图标的颜色、大小、边框等样式。 6. `feature`:toolbox 组件中的工具项配置,包括了数据视图、数据区域缩放、动态类型切换、保存图片等功能,可以根据需求选择需要的工具项。 7. `dataView`:数据视图工具项配置,包括了是否显示数据视图、数据视图的标题、数据视图的样式等属性。 8. `dataZoom`:数据区域缩放工具项配置,包括了是否显示数据区域缩放、数据区域缩放的类型、数据区域缩放的范围等属性。 9. `magicType`:动态类型切换工具项配置,包括了是否显示动态类型切换、动态类型切换的类型、动态类型切换的标题等属性。 10. `saveAsImage`:保存图片工具项配置,包括了是否显示保存图片、保存图片的格式、保存图片的名称等属性。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值