Your IP : 172.69.7.233


Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/js/ui/vue3/directives/hint/src/
Upload File :
Current File : /var/www/element/data/www/revenuestory.ru/bitrix/js/ui/vue3/directives/hint/src/directive.js

/**
 * Hint Vue directive
 *
 * @package bitrix
 * @subpackage ui
 * @copyright 2001-2022 Bitrix
 */

/*
	<span v-hint="$Bitrix.Loc.getMessage('HINT_HTML')" data-hint-html>Html code</span>
	<span v-hint="{text: 'Text node'}">Plain text</span>
	<span v-hint="{html: '<b>Html</b> code'}">Html code</span>
	<span v-hint="{text: 'Custom position top and light mode', position: 'top', popupOptions: {darkMode: false}}">Text top on light panel</span>
*/

import {Tooltip} from './tooltip';
import {Event} from 'main.core';
import 'ui.hint';

export const hint = {
	beforeMount(element: HTMLElement, bindings): void
	{
		Event.bind(element, 'mouseenter', () => Tooltip.show(element, bindings));
		Event.bind(element, 'mouseleave', () => Tooltip.hide());
	}
};