Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/ilovecveti.ru/bitrix/js/ui/accessrights/v2/src/components/util/ |
Upload File : |
import { Dom, Tag } from 'main.core'; import 'ui.hint'; import { mapState } from 'ui.vue3.vuex'; import { ServiceLocator } from '../../service/service-locator'; /** * A special case of Hint that provides interactivity and reactivity. */ export const Hint = { name: 'Hint', props: { html: { type: String, required: true, }, }, computed: { ...mapState({ guid: (state) => state.application.guid, }), }, mounted() { this.renderHint(); }, watch: { html(): void { // make ui.hint reactive :( Dom.clean(this.$refs.container); this.renderHint(); }, }, methods: { renderHint(): void { const hintIconWrapper = Tag.render`<span data-hint-html="true" data-hint-interactivity="true"></span>`; // Tag.render cant set prop value with HTML properly :( hintIconWrapper.setAttribute('data-hint', this.html); Dom.append( hintIconWrapper, this.$refs.container, ); this.getHintManager().initNode(hintIconWrapper); }, getHintManager(): BX.UI.Hint { return ServiceLocator.getHint(this.guid); }, }, template: '<span class="ui-access-rights-v2-hint-container" ref="container"></span>', };