mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
Add Element Display
This commit is contained in:
parent
60fabb254f
commit
8e9d29327d
1 changed files with 19 additions and 0 deletions
19
client/src/components/display/ElementDisplay.vue
Normal file
19
client/src/components/display/ElementDisplay.vue
Normal file
|
@ -0,0 +1,19 @@
|
|||
<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>
|
Loading…
Add table
Reference in a new issue