claude-web/node_modules/primevue/badge/Badge.vue

27 lines
648 B
Vue
Raw Permalink Normal View History

2026-02-23 02:23:38 +00:00
<template>
<span :class="cx('root')" :data-p="dataP" v-bind="ptmi('root')">
<slot>{{ value }}</slot>
</span>
</template>
<script>
import { cn } from '@primeuix/utils';
import BaseBadge from './BaseBadge.vue';
export default {
name: 'Badge',
extends: BaseBadge,
inheritAttrs: false,
computed: {
dataP() {
return cn({
circle: this.value != null && String(this.value).length === 1,
empty: this.value == null && !this.$slots.default,
[this.severity]: this.severity,
[this.size]: this.size
});
}
}
};
</script>