refactor: #7090 for BadgeDirective

pull/7007/merge
Mert Sincan 2025-01-14 12:17:52 +00:00
parent 85b7d30eaa
commit ca8d2d9d5a
1 changed files with 2 additions and 2 deletions

View File

@ -1,11 +1,11 @@
import { addClass, createElement, hasClass, removeClass } from '@primeuix/utils/dom'; import { addClass, createElement, hasClass, removeClass } from '@primeuix/utils/dom';
import { UniqueComponentId } from '@primevue/core/utils'; import { uuid } from '@primeuix/utils/uuid';
import BaseBadgeDirective from './BaseBadgeDirective'; import BaseBadgeDirective from './BaseBadgeDirective';
const BadgeDirective = BaseBadgeDirective.extend('badge', { const BadgeDirective = BaseBadgeDirective.extend('badge', {
mounted(el, binding) { mounted(el, binding) {
console.warn('Deprecated since v4. Use OverlayBadge component instead.'); console.warn('Deprecated since v4. Use OverlayBadge component instead.');
const id = UniqueComponentId() + '_badge'; const id = uuid('pv_id') + '_badge';
const badge = createElement('span', { const badge = createElement('span', {
id, id,