-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding detail and field as well as css for future use
- Loading branch information
Monaye Win
committed
Aug 31, 2020
1 parent
c2f33e5
commit e35cf3c
Showing
6 changed files
with
127 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<template> | ||
<panel-item :field="field" /> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ['resource', 'resourceName', 'resourceId', 'field'], | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<template> | ||
<default-field :field="field" :errors="errors"> | ||
<template slot="field"> | ||
<input | ||
:id="field.name" | ||
type="text" | ||
class="w-full form-control form-input form-input-bordered" | ||
:class="errorClasses" | ||
:placeholder="field.name" | ||
v-model="value" | ||
/> | ||
</template> | ||
</default-field> | ||
</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.field.attribute, this.value || '') | ||
}, | ||
/** | ||
* Update the field's internal value. | ||
*/ | ||
handleChange(value) { | ||
this.value = value | ||
}, | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Nova.booting((Vue, router, store) => { | ||
Vue.component("index-simple-link-button", require("./components/IndexField").default); | ||
}); | ||
Vue.component('index-simple-link-button', require('./components/IndexField')) | ||
Vue.component('detail-simple-link-button', require('./components/DetailField')) | ||
Vue.component('form-simple-link-button', require('./components/FormField')) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
// Nova Tool CSS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters