Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Box = tclayout.Box
Box create a box container.
var Button = tcinput.Button
Button create a button and return true if it's clicked.
var ButtonWithConf = tcinput.ButtonWithConf
ButtonWithConf create a button and return true if it's clicked.
var Checkbox = tcinput.Checkbox
Checkbox create a checkbox and return true if it's clicked.
var CheckboxWithConf = tcinput.CheckboxWithConf
CheckboxWithConf create a checkbox and return true if it's clicked.
var Code = tccontent.Code
Code create a code block with syntax highlight.
var CodeWithConf = tccontent.CodeWithConf
CodeWithConf create a code block with syntax highlight.
var Column = tclayout.Column
Column create N columns.
var Column1 = tclayout.Column1
Column create 1 column.
var Column2 = tclayout.Column2
Column2 create 2 columns.
var Column3 = tclayout.Column3
Column3 create 3 columns.
var Datepicker = tcinput.Datepicker
Datepicker create a datepicker and return its selected date.
var Datetimepicker = tcinput.Datetimepicker
Datetimepicker create a datetimepicker and return its selected datetime.
var Divider = tccontent.Divider
Divider create a horizontal line.
var DividerWithID = tccontent.DividerWithID
DividerWithID create a horizontal line with ID.
var DownloadButton = tcinput.DownloadButton
DownloadButton create a download button component.
var DownloadButtonWithConf = tcinput.DownloadButtonWithConf
DownloadButtonWithConf create a download button component with a user specific configuration.
var Echo = tcmisc.Echo
Echo will execute lambda and show the code in the lambda. To use Echo, we need to store the code in advance (usually by embedded).
//go:embed main.go
var code string
// ...
// ok, echo will execute and show `tccontent.Text(c, "hello echo")`
tcmisc.Echo(c, code, func() {
tccontent.Text(c, "hello echo")
})
// panic, since Echo only parse code line by line
tcmisc.Echo(c, code, func() {tccontent.Text(c, "hello echo")})
// panic, since Echo only parse code that start from caller
myFunc := func() {
tccontent.Text(c, "hello echo")
}
tcmisc.Echo(c, code, myFunc)
var EqColumn = tclayout.EqColumn
EqColumn create N columns with same width.
var EqColumn1 = tclayout.EqColumn1
EqColumn1 create 1 columns with same width.
var EqColumn2 = tclayout.EqColumn2
EqColumn2 create 2 columns with same width.
var EqColumn3 = tclayout.EqColumn3
EqColumn3 create 3 columns with same width.
var EqColumn4 = tclayout.EqColumn4
EqColumn4 create 4 columns with same width.
var EqColumn5 = tclayout.EqColumn5
EqColumn5 create 5 columns with same width.
var Expand = tclayout.Expand
Expand create a expandable component.
var Fileupload = tcinput.Fileupload
Fileupload create a fileupload and return its selected file.
var Form = tcinput.Form
Form create a form component.
var Html = tcmisc.Html
Html adds a html component to the container.
var HtmlWithID = tcmisc.HtmlWithID
HtmlWithID adds a html component to the container with a specific id.
var Iframe = tcmisc.Iframe
Iframe show a iframe. script is used to allow the iframe to run javascript. (notice that this is not secure)
var IframeWithID = tcmisc.IframeWithID
IframeWithID create a iframe component with a user specific id. script is used to allow the iframe to run javascript. (notice that this is not secure)
var Image = tccontent.Image
Image show a image.
var ImageWithConf = tccontent.ImageWithConf
ImageWithConf show a image with a custom configuration.
var JSON = tcdata.JSON
JSON create a JSON viewer for v.
var Latex = tccontent.Latex
Latex create a latex component.
var LatexWithID = tccontent.LatexWithID
LatexWithID create a latex component with a user specific id.
var Link = tccontent.Link
var LinkWithID = tccontent.LinkWithID
LinkWithID create a link component with a user specific id.
var Markdown = tccontent.Markdown
Markdown render markdown to html.
var MarkdownWithID = tccontent.MarkdownWithID
Markdown create a markdown-rendering part with a user-specific id.
var Message = tcmisc.Message
Message shows a message to the user.
var MessageDanger = tcmisc.MessageDanger
MessageDanger is a component that displays a message with danger color.
var MessageInfo = tcmisc.MessageInfo
MessageInfo is a component that displays a message with info color.
var MessageSuccess = tcmisc.MessageSuccess
MessageSuccess is a component that displays a message with success color.
var MessageWarning = tcmisc.MessageWarning
MessageWarning is a component that displays a message with warning color.
var MessageWithConf = tcmisc.MessageWithConf
MessageWithConf shows a message to the user with a specific configuration.
var NumberFloat64 = tcinput.Number[float64]
Number create a number input and return its value.
var NumberInt64 = tcinput.Number[int64]
NumberInt64 create a number input and return its value.
var NumberWithConfFloat64 = tcinput.NumberWithConf[float64]
NumberWithConf create a number input and return its value.
var NumberWithConfInt64 = tcinput.NumberWithConf[int64]
NumberWithConfInt64 create a number input and return its value.
var ProgressBar = tcmisc.ProgressBar
ProgressBar shows a progress bar to the user.
var Radio = tcinput.Radio
Radio create a group of radio items and return its selected value.
var Select = tcinput.Select
Select create a select dropdown list and return its selected value.
var Subtitle = tccontent.Subtitle
Subtitle create a subtitle.
var SubtitleWithID = tccontent.SubtitleWithID
SubtitleWithID create a subtitle component with a user specific id.
var Tab = tclayout.Tab
Tab create a tab component.
var Tab2 = tclayout.Tab2
Tab2 create 2 tabs.
var Tab3 = tclayout.Tab3
Tab3 create 3 tabs.
var Tab4 = tclayout.Tab4
Tab4 create 4 tabs.
var Tab5 = tclayout.Tab5
Tab5 create 5 tabs.
var Table = tcdata.Table
Table create a table by heading(head) and values(table).
var Text = tccontent.Text
Text show a text.
var TextWithID = tccontent.TextWithID
TextWithID create a text component with a user specific id.
var Textarea = tcinput.Textarea
Textarea create a textarea and return its value.
var TextareaWithConf = tcinput.TextareaWithConf
TextareaWithConf create a textarea and return its value.
var Textbox = tcinput.Textbox
Textbox create a textbox and return its value.
var TextboxWithConf = tcinput.TextboxWithConf
TextboxWithConf create a textbox and return its value.
var Timepicker = tcinput.Timepicker
Timepicker create a timepicker and return its selected time.
var Title = tccontent.Title
Title show a title.
var TitleWithID = tccontent.TitleWithID
TitleWithID create a title component with a user specific id.
Functions ¶
This section is empty.
Types ¶
type CheckboxConf ¶ added in v0.2.2
type CheckboxConf = tcinput.CheckboxConf
CheckboxConf store optional conf for Checkbox
type DownloadButtonConf ¶
type DownloadButtonConf = tcinput.DownloadButtonConf
type MessageConf ¶
type MessageConf = tcmisc.MessageConf
MessageConf is the configuration for the Message component.
type TextareaConf ¶ added in v0.2.2
type TextareaConf = tcinput.TextareaConf
TextareaConf store optional conf for Textarea
type TextboxConf ¶
type TextboxConf = tcinput.TextboxConf
TextboxConf store optional conf for Textbox