Add delay customization to tooltip.js

This MR allows the delay of tooltips instantiated using
tooltip.js to be customized through localStorage.
上级 ebcf92c5
......@@ -3,8 +3,12 @@ import '~/commons/bootstrap';
export default {
bind(el) {
const glTooltipDelay = localStorage.getItem('gl-tooltip-delay');
const delay = glTooltipDelay ? JSON.parse(glTooltipDelay) : 0;
$(el).tooltip({
trigger: 'hover',
delay,
});
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册