Icon

Updated at:

Introduction

Semantic vector graphics.

image

Configuration items

Category

Configuration

Example

Description

Content

Icon

Select the icon to display.

Enable badge

Specifies whether to enable the badge.

Badge configuration

Number: The number to display.

Overflow count: If the number exceeds the overflow count, it is displayed as `[overflow count]+`.

Dot: If the number is greater than 0, a red dot is displayed instead of the number.

Show zero: Specifies whether to show the badge when the number is 0.

Size: The logo size.

Tooltip

Specifies whether to enable the tooltip.

Tooltip configuration

Content: The text content of the tooltip.

Background color: Specifies the background color for the tooltip.

Position: The display position of the bubble.

Trigger method: The method to trigger the tooltip display. Options include hover and click.

Interaction

Hide

Hides the component. For more information, see Common properties.

Keep layout when hidden

Keeps the layout space when the component is hidden. For more information, see Common properties.

Style

Height

Sets the component height.

Margin

The margin of the component. For more information, see Common properties.

Font size

Sets the icon size using the font size.

Horizontal alignment

The horizontal alignment. Options include left, center, and right.

CSS Style

Text color

The text color. For more information, see Common properties.

Text shadow

image

The text shadow. For more information, see Common properties.

Border

The border. For more information, see Common properties.

Border radius

The border radius. For more information, see Common properties.

Padding

The padding. For more information, see Common properties.

Properties and methods

Name

Type

Example

Description

text

string

icon.text

The text content of the component.

hidden

string

icon.hidden

Specifies whether the component is hidden.

clearHidden

func

icon.clearHidden()

Clears the `hidden` value of the component.

clearText

func

icon.clearText()

Clears the `text` value of the component.

setHidden

func

icon.setHidden(true)

Sets whether the component is hidden.

setText

func

icon.setText('icon')

Sets the text content of the component.

Event callbacks

Configuration

Description

The click event of the component.