.. _class_createMainParam_choice_or_radio: createMainParam_choice_or_radio =============================== **图块代码** .. image:: img/createMainParam_choice_or_radio.png ---- **javascript** .. code-block:: javascript { type: style, name: name, caption: caption, initial: value, values: [], captions: [] }, ---- **python** .. code-block:: python { "type": style, "name": name, "caption": caption, "initial": value, "values": [], "captions": [] }, ---- **npl** .. code-block:: lua { type = style, name = name, caption = caption, initial = value, values = {}, captions = {} }, ---- 参数 ---- +-----------+----------+-------------+--------+ | 参数 | 类型 | 默认值 | 说明 | +===========+==========+=============+========+ | style | string | "choice" | | +-----------+----------+-------------+--------+ | name | string | "choice1" | | +-----------+----------+-------------+--------+ | caption | string | "列表" | | +-----------+----------+-------------+--------+ | value | string | "" | | +-----------+----------+-------------+--------+ 示例 ---- .. tabs:: .. tab:: javascript .. code-block:: javascript { type: choice, name: 'choice1', caption: '列表', initial: '', values: [], captions: [] }, .. tab:: python .. code-block:: python { "type": choice, "name": 'choice1', "caption": '列表', "initial": '', "values": [], "captions": [] }, .. tab:: npl .. code-block:: lua { type = choice, name = 'choice1', caption = '列表', initial = '', values = {}, captions = {} },