mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-12 11:18:21 +00:00
19 lines
464 B
Vue
19 lines
464 B
Vue
<script setup lang="ts">
|
|
const props = withDefaults(defineProps<{
|
|
data: any,
|
|
component?: string,
|
|
componentProp?: '',
|
|
}>(), {
|
|
data: '',
|
|
component: '',
|
|
componentProp: '',
|
|
});
|
|
</script>
|
|
<template>
|
|
<div v-if="data" class="pillbar">
|
|
<div class="pill">
|
|
<component v-bind="{[props.componentProp]: props.data}" :is="props.component" v-if="props.component !== ''"/>
|
|
<template v-else>{{ props.data }}</template>
|
|
</div>
|
|
</div>
|
|
</template>
|