refactor: #7090 for BadgeDirective
parent
85b7d30eaa
commit
ca8d2d9d5a
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue