2
0
mirror of https://github.com/tenrok/bootstrap.git synced 2026-06-08 17:22:31 +03:00

Object spread : less jQuery more ES6 (#24665)

This commit is contained in:
Johann-S
2017-11-13 11:25:36 +01:00
committed by GitHub
parent 1354a929f9
commit 9a0bba9afa
9 changed files with 85 additions and 51 deletions
+18 -12
View File
@@ -26,19 +26,25 @@ const Popover = (($) => {
const CLASS_PREFIX = 'bs-popover'
const BSCLS_PREFIX_REGEX = new RegExp(`(^|\\s)${CLASS_PREFIX}\\S+`, 'g')
const Default = $.extend({}, Tooltip.Default, {
placement : 'right',
trigger : 'click',
content : '',
template : '<div class="popover" role="tooltip">'
+ '<div class="arrow"></div>'
+ '<h3 class="popover-header"></h3>'
+ '<div class="popover-body"></div></div>'
})
const Default = {
...Tooltip.Default,
...{
placement : 'right',
trigger : 'click',
content : '',
template : '<div class="popover" role="tooltip">'
+ '<div class="arrow"></div>'
+ '<h3 class="popover-header"></h3>'
+ '<div class="popover-body"></div></div>'
}
}
const DefaultType = $.extend({}, Tooltip.DefaultType, {
content : '(string|element|function)'
})
const DefaultType = {
...Tooltip.DefaultType,
...{
content : '(string|element|function)'
}
}
const ClassName = {
FADE : 'fade',