add nova
This commit is contained in:
38
nova/resources/js/fields/Detail/StatusField.vue
Normal file
38
nova/resources/js/fields/Detail/StatusField.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<PanelItem :index="index" :field="field">
|
||||
<template #value>
|
||||
<Badge
|
||||
v-if="fieldHasValue"
|
||||
class="whitespace-nowrap inline-flex items-center"
|
||||
:class="field.typeClass"
|
||||
>
|
||||
<span class="mr-1 -ml-1">
|
||||
<Loader v-if="field.type == 'loading'" width="20" class="mr-1" />
|
||||
<Icon
|
||||
v-if="field.type == 'failed'"
|
||||
:solid="true"
|
||||
type="exclamation-circle"
|
||||
/>
|
||||
<Icon
|
||||
v-if="field.type == 'success'"
|
||||
:solid="true"
|
||||
type="check-circle"
|
||||
/>
|
||||
</span>
|
||||
{{ fieldValue }}
|
||||
</Badge>
|
||||
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</PanelItem>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { FieldValue } from '@/mixins'
|
||||
|
||||
export default {
|
||||
mixins: [FieldValue],
|
||||
|
||||
props: ['index', 'resource', 'resourceName', 'resourceId', 'field'],
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user