UnisKB/apps/common/froms/switch_btn.py

29 lines
793 B
Python
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# coding=utf-8
"""
@project: maxkb
@Author
@file switch_btn.py
@date2023/10/31 18:00
@desc:
"""
from typing import List
from common.froms.base_field import TriggerType, BaseField
class SwitchBtn(BaseField):
"""
开关
"""
def __init__(self,
label: str,
required: bool = False,
default_value=None,
relation_show_field_list: List[str] = None,
relation_show_value_list: List[str] = None,
attrs=None, props_info=None):
super().__init__('SwitchBtn', label, required, default_value, relation_show_field_list,
relation_show_value_list, [], [],
TriggerType.OPTION_LIST, attrs, props_info)