Работа над viewport формы, добавление описания для поля формы, комментарии к fileSelect модели

This commit is contained in:
XeRo 2026-01-19 17:44:49 +05:00
parent ecc89e34c5
commit c7ff7662ba
9 changed files with 333 additions and 207 deletions

View file

@ -2,15 +2,13 @@ package fields
import tea "github.com/charmbracelet/bubbletea"
// todo комментарии к полям
// todo описание поля выводить
type FieldModel interface {
Init() tea.Cmd
Update(msg tea.Msg) (FieldModel, tea.Cmd)
View() string
Focus()
Blur()
CaptureKeys() bool
GetLabel() string
GetValue() interface{}
Init() tea.Cmd //Метод инициализации поля
Update(msg tea.Msg) (FieldModel, tea.Cmd) //Метод отслеживания событий связанных с моделью
View() string //Метод отрисовки модели
Focus() //Метод установки фокуса
Blur() //Метод удаления фокуса
CaptureKeys() bool //Метод проверяющий захват событий
GetLabel() string //Получить имя поля
GetValue() interface{} //Получить значение поля
}