mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 13:59:06 +02:00
create a base component
This commit is contained in:
@@ -108,7 +108,7 @@ class Popover extends Tooltip {
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())
|
||||
let content = this._getContent()
|
||||
if (typeof content === 'function') {
|
||||
content = content.call(this.element)
|
||||
content = content.call(this._element)
|
||||
}
|
||||
|
||||
this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)
|
||||
@@ -123,7 +123,7 @@ class Popover extends Tooltip {
|
||||
}
|
||||
|
||||
_getContent() {
|
||||
return this.element.getAttribute('data-bs-content') ||
|
||||
return this._element.getAttribute('data-bs-content') ||
|
||||
this.config.content
|
||||
}
|
||||
|
||||
@@ -161,10 +161,6 @@ class Popover extends Tooltip {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
static getInstance(element) {
|
||||
return Data.getData(element, DATA_KEY)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user