Работа над viewport формы, добавление описания для поля формы, комментарии к fileSelect модели
This commit is contained in:
parent
ecc89e34c5
commit
c7ff7662ba
9 changed files with 333 additions and 207 deletions
|
|
@ -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{} //Получить значение поля
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue