text_input_field.py 749 B

12345678910111213141516171819202122232425262728
  1. # coding=utf-8
  2. """
  3. @project: maxkb
  4. @Author:虎
  5. @file: text_input_field.py
  6. @date:2023/10/31 17:58
  7. @desc:
  8. """
  9. from typing import Dict
  10. from common.forms import BaseLabel
  11. from common.forms.base_field import BaseField, TriggerType
  12. class TextInputField(BaseField):
  13. """
  14. 文本输入框
  15. """
  16. def __init__(self, label: str or BaseLabel,
  17. required: bool = False,
  18. default_value=None,
  19. relation_show_field_dict: Dict = None,
  20. attrs=None, props_info=None):
  21. super().__init__('TextInput', label, required, default_value, relation_show_field_dict,
  22. {},
  23. TriggerType.OPTION_LIST, attrs, props_info)