## CellTooltip 基于 Bootstrap 5 + Font Awesome 6 的消息提示插件 (Base on [Bootstrap#Alerts](https://getbootstrap.com/docs/5.2/components/alerts/)) **Kind**: global class **Version**: 1.0.3 **Author**: Lruihao * [CellTooltip](#CellTooltip) * [new CellTooltip(option)](#new_CellTooltip_new) * [.find(selector)](#CellTooltip+find) ⇒ Element * [.setClassName([className])](#CellTooltip+setClassName) ⇒ [CellTooltip](#CellTooltip) * [.setContent([content])](#CellTooltip+setContent) ⇒ [CellTooltip](#CellTooltip) * [.setContentClass([contentClass])](#CellTooltip+setContentClass) ⇒ [CellTooltip](#CellTooltip) * [.setIcon([iconClass])](#CellTooltip+setIcon) ⇒ [CellTooltip](#CellTooltip) * [.show(option)](#CellTooltip+show) ⇒ [CellTooltip](#CellTooltip) * [.hide()](#CellTooltip+hide) ⇒ [CellTooltip](#CellTooltip) * [.{type}(option)](#CellTooltip+{type}) ⇒ [CellTooltip](#CellTooltip) ### new CellTooltip(option) Constructor of Cell Tooltip | Param | Type | Default | Description | | --- | --- | --- | --- | | option | Object | | 初始化设置 | | [option.appendTo] | String | 'body' | parent selector | | [option.type] | String | | Tooltip 类型,可选值:
['primary', 'secondary', 'success', 'danger', 'error', 'warning', 'info', 'light', 'dark'] | | [option.className] | String | 'alert-light' | tooltip className in HTML | | [option.iconClass] | String | | className in HTML for icon element | | [option.content] | String | | Tooltip Content (HTML format is supported) | | [option.contentClass] | String | | className in HTML for content element | | [option.closeable] | Boolean | true | 是否可关闭 | | [option.delay] | Number | 3000 | 延迟关闭时间,unit: ms | | [option.position] | String | 'top-center' | Tooltip 位置,可选值:
['top-start', 'top-center', 'top-end', 'bottom-start', 'bottom-center', 'bottom-end', 'start-center', 'end-center'] | | [option.offset] | Number | 0 | Tooltip 偏移量,unit: px | ### cellTooltip.find(selector) ⇒ Element 查找子元素 **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Description | | --- | --- | --- | | selector | String | css selector | ### cellTooltip.setClassName([className]) ⇒ [CellTooltip](#CellTooltip) 设置 Tooltip 类名 **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Default | Description | | --- | --- | --- | --- | | [className] | String | 'alert-light' | tooltip's className in HTML | ### cellTooltip.setContent([content]) ⇒ [CellTooltip](#CellTooltip) 设置內容 **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Description | | --- | --- | --- | | [content] | String | Tooltip Content (HTML format is supported) | ### cellTooltip.setContentClass([contentClass]) ⇒ [CellTooltip](#CellTooltip) 设置內容 Class **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Description | | --- | --- | --- | | [contentClass] | String | className in HTML for content element | ### cellTooltip.setIcon([iconClass]) ⇒ [CellTooltip](#CellTooltip) 设置 Tooltip icon **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Description | | --- | --- | --- | | [iconClass] | String | className in HTML for font-awesome icon element | ### cellTooltip.show(option) ⇒ [CellTooltip](#CellTooltip) 显示 Tooltip 提示 **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 | Param | Type | Description | | --- | --- | --- | | option | Object | see [Constructor](#CellTooltip) | ### cellTooltip.hide() ⇒ [CellTooltip](#CellTooltip) 关闭 Tooltip 提示 **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.0 ### cellTooltip.{type}(option) ⇒ [CellTooltip](#CellTooltip) 显示指定类型的 Tooltip 提示
type: ['success', 'error', 'warning', 'info'] **Kind**: instance method of [CellTooltip](#CellTooltip) **Since**: 1.0.3 | Param | Type | Description | | --- | --- | --- | | option | Object | see [show](#CellTooltip+show) |