This commit is contained in:
2024-09-01 18:54:23 +05:00
parent 76d18365a5
commit 061f09eca1
1597 changed files with 109451 additions and 1 deletions

View File

@@ -0,0 +1 @@
/* Nova Field CSS */

View File

@@ -0,0 +1,9 @@
<template>
<PanelItem :index="index" :field="field" />
</template>
<script>
export default {
props: ['index', 'resource', 'resourceName', 'resourceId', 'field'],
}
</script>

View File

@@ -0,0 +1,45 @@
<template>
<DefaultField
:field="field"
:errors="errors"
:show-help-text="showHelpText"
:full-width-content="fullWidthContent"
>
<template #field>
<input
:id="field.attribute"
type="text"
class="w-full form-control form-input form-control-bordered"
:class="errorClasses"
:placeholder="field.name"
v-model="value"
/>
</template>
</DefaultField>
</template>
<script>
import { FormField, HandlesValidationErrors } from 'laravel-nova'
export default {
mixins: [FormField, HandlesValidationErrors],
props: ['resourceName', 'resourceId', 'field'],
methods: {
/*
* Set the initial, internal value for the field.
*/
setInitialValue() {
this.value = this.field.value || ''
},
/**
* Fill the given FormData object with the field's internal value.
*/
fill(formData) {
formData.append(this.fieldAttribute, this.value || '')
},
},
}
</script>

View File

@@ -0,0 +1,15 @@
<template>
<span>{{ fieldValue }}</span>
</template>
<script>
export default {
props: ['resourceName', 'field'],
computed: {
fieldValue() {
return this.field.displayedAs || this.field.value
},
}
}
</script>

View File

@@ -0,0 +1,9 @@
import IndexField from './components/IndexField'
import DetailField from './components/DetailField'
import FormField from './components/FormField'
Nova.booting((app, store) => {
app.component('index-{{ component }}', IndexField)
app.component('detail-{{ component }}', DetailField)
app.component('form-{{ component }}', FormField)
})