Последняя версия с сервера прошлого разработчика
This commit is contained in:
43
nova/resources/js/components/Form/StatusField.vue
Executable file
43
nova/resources/js/components/Form/StatusField.vue
Executable file
@@ -0,0 +1,43 @@
|
||||
<template>
|
||||
<default-field :field="field" :errors="errors" :show-help-text="showHelpText">
|
||||
<template slot="field">
|
||||
<input
|
||||
:id="field.attribute"
|
||||
:type="inputType"
|
||||
:min="inputMin"
|
||||
:max="inputMax"
|
||||
:step="inputStep"
|
||||
v-model="value"
|
||||
class="w-full form-control form-input form-input-bordered"
|
||||
:class="errorClasses"
|
||||
:placeholder="field.name"
|
||||
/>
|
||||
</template>
|
||||
</default-field>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { FormField, HandlesValidationErrors } from 'laravel-nova'
|
||||
|
||||
export default {
|
||||
mixins: [HandlesValidationErrors, FormField],
|
||||
|
||||
computed: {
|
||||
inputType() {
|
||||
return this.field.type || 'text'
|
||||
},
|
||||
|
||||
inputStep() {
|
||||
return this.field.step
|
||||
},
|
||||
|
||||
inputMin() {
|
||||
return this.field.min
|
||||
},
|
||||
|
||||
inputMax() {
|
||||
return this.field.max
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user