2023-11-16 05:16:27 +00:00
|
|
|
|
# coding=utf-8
|
|
|
|
|
|
"""
|
|
|
|
|
|
@project: maxkb
|
|
|
|
|
|
@Author:虎
|
|
|
|
|
|
@file: text_input_field.py
|
|
|
|
|
|
@date:2023/10/31 17:58
|
|
|
|
|
|
@desc:
|
|
|
|
|
|
"""
|
2024-03-21 06:49:21 +00:00
|
|
|
|
from typing import Dict
|
2023-11-16 05:16:27 +00:00
|
|
|
|
|
2024-12-10 06:56:52 +00:00
|
|
|
|
from common.forms import BaseLabel
|
2024-04-15 11:06:42 +00:00
|
|
|
|
from common.forms.base_field import BaseField, TriggerType
|
2023-11-16 05:16:27 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class TextInputField(BaseField):
|
|
|
|
|
|
"""
|
|
|
|
|
|
文本输入框
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
2024-12-10 06:56:52 +00:00
|
|
|
|
def __init__(self, label: str or BaseLabel,
|
2023-11-16 05:16:27 +00:00
|
|
|
|
required: bool = False,
|
|
|
|
|
|
default_value=None,
|
2023-11-23 09:55:39 +00:00
|
|
|
|
relation_show_field_dict: Dict = None,
|
|
|
|
|
|
|
2023-11-16 05:16:27 +00:00
|
|
|
|
attrs=None, props_info=None):
|
2023-11-23 09:55:39 +00:00
|
|
|
|
super().__init__('TextInput', label, required, default_value, relation_show_field_dict,
|
|
|
|
|
|
{},
|
2023-11-16 05:16:27 +00:00
|
|
|
|
TriggerType.OPTION_LIST, attrs, props_info)
|