mirror of
https://github.com/twbs/bootstrap.git
synced 2025-09-27 13:59:06 +02:00
Extract static DATA_KEY
& EVENT_KEY
to base-component (#33635)
* Force each plugin that extends base-components to implement a static method `NAME()` * Remove redundant `NAME` argument from 'Utils.defineJQueryPlugin' & fix test
This commit is contained in:
@@ -43,8 +43,8 @@ const CLASS_NAME_SHOW = 'show'
|
||||
class Alert extends BaseComponent {
|
||||
// Getters
|
||||
|
||||
static get DATA_KEY() {
|
||||
return DATA_KEY
|
||||
static get NAME() {
|
||||
return NAME
|
||||
}
|
||||
|
||||
// Public
|
||||
@@ -127,6 +127,6 @@ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDi
|
||||
* add .Alert to jQuery only if jQuery is present
|
||||
*/
|
||||
|
||||
defineJQueryPlugin(NAME, Alert)
|
||||
defineJQueryPlugin(Alert)
|
||||
|
||||
export default Alert
|
||||
|
Reference in New Issue
Block a user