MaxKB/apps/common/forms/switch_field.py
zhangshaohu 2e7b31dc3c
Some checks are pending
sync2gitee / repo-sync (push) Waiting to run
Typos Check / Spell Check with Typos (push) Waiting to run
feat: 新增动态表单收集器
2024-10-13 20:05:50 +08:00

34 lines
882 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

"""
@project: MaxKB
@Author
@file switch_field.py
@date2024/10/13 19:43
@desc:
"""
from typing import Dict
from common.forms import BaseField, TriggerType, BaseLabel
class SwitchField(BaseField):
"""
滑块输入框
"""
def __init__(self, label: str or BaseLabel,
required: bool = False,
default_value=None,
relation_show_field_dict: Dict = None,
attrs=None, props_info=None):
"""
@param required: 是否必填
@param default_value: 默认值
@param relation_show_field_dict:
@param attrs:
@param props_info:
"""
super().__init__('Switch', label, required, default_value, relation_show_field_dict,
{},
TriggerType.OPTION_LIST, attrs, props_info)