Skip to content
On this page

Vext App Store

Pinia store that holds generic app information regarding the global alert or tooltip.

State

NameDescriptionTypeValuesDefault
alertTextglobal alert textstring-""
alertTypeglobal alert typestring["info", "success", "warning", "error"]"error"
alertDurationduration in ms that the alert is shownnumber-6000
ttXx position of the tooltipnumber-0
ttYy position of the tooltipnumber-0
ttContentcontent of the tooltipstring-""
ttPlacementplacement of the tooltipstring-"auto"

Methods

alert

Set the alert text and type for a global alert
@param {String} text
@param {String} type

info

Set the alert text with the type 'info'
@param {String} text

success

Set the alert text with the type 'success'
@param {String} text

warning

Set the alert text with the type 'warning'
@param {String} text

error

Set the alert text with the type 'error'
@param {String} text

showTooltip

Show the global VextToolTip with content at position [x, y]. Content can be either a string, an object or an array of objects. The x and y coordinates are expected to be in absolute document coordinates. If no placement is given, the default is 'auto'.
@param {*} content
@param {Number} x
@param {Number} y
@param {String} placement

hideTooltip

Hide the tooltip.

updateTooltipPos

Update the tooltip's position and placement.
@param {Number} x
@param {Number} y
@param {String} placement