Added forms for Class level, damage multiplier, experience, folder, note, proficiency

This commit is contained in:
Stefan Zermatten
2019-07-23 11:28:26 +02:00
parent 946b47ea61
commit 1bfb48c672
18 changed files with 604 additions and 33 deletions

View File

@@ -0,0 +1,52 @@
<template lang="html">
<v-menu
v-model="menu"
:close-on-content-click="false"
lazy
transition="scale-transition"
full-width
min-width="290px"
>
<template v-slot:activator="{ on }">
<v-text-field
:value="formattedSafeValue"
v-bind="$attrs"
prepend-icon="event"
readonly
v-on="on"
:loading="loading"
:error-messages="errors"
@focus="focused = true"
@blur="focused = false"
box
></v-text-field>
</template>
<v-date-picker :value="formattedSafeValue" @input="dateInput"></v-date-picker>
</v-menu>
</template>
<script>
import SmartInput from '/imports/ui/components/global/SmartInputMixin.js';
import { format } from 'date-fns';
export default {
mixins: [SmartInput],
data(){return {
menu: false,
};},
methods: {
dateInput(e){
this.menu = false;
this.input(e);
},
},
computed: {
formattedSafeValue(){
return format(this.safeValue, 'YYYY-MM-DD')
},
},
}
</script>
<style lang="css" scoped>
</style>

View File

@@ -20,7 +20,7 @@ export default {
inputValue: this.value,
};},
props: {
value: [String, Number],
value: [String, Number, Date],
debounceTime: {
type: Number,
default: 750,

View File

@@ -1,9 +1,11 @@
import Vue from "vue";
// Global components
import DatePicker from '/imports/ui/components/global/DatePicker.vue';
import TextField from '/imports/ui/components/global/TextField.vue';
import TextArea from '/imports/ui/components/global/TextArea.vue';
import SmartSelect from '/imports/ui/components/global/SmartSelect.vue';
Vue.component("date-picker", DatePicker);
Vue.component("text-field", TextField);
Vue.component("text-area", TextArea);
Vue.component("smart-select", SmartSelect);