Added action form, but without buffs
This commit is contained in:
@@ -1,20 +0,0 @@
|
||||
<template lang="html">
|
||||
<v-expansion-panel popout>
|
||||
<v-expansion-panel-content>
|
||||
<div slot="header" class="subheading">
|
||||
Advanced
|
||||
</div>
|
||||
<v-card-text>
|
||||
<slot/>
|
||||
</v-card-text>
|
||||
</v-expansion-panel-content>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="css" scoped>
|
||||
</style>
|
||||
34
app/imports/ui/components/forms/FormSection.vue
Normal file
34
app/imports/ui/components/forms/FormSection.vue
Normal file
@@ -0,0 +1,34 @@
|
||||
<template lang="html">
|
||||
<form-sections v-if="standalone">
|
||||
<v-expansion-panel-content>
|
||||
<div slot="header" class="subheading">
|
||||
{{name}}
|
||||
</div>
|
||||
<v-card-text>
|
||||
<slot/>
|
||||
</v-card-text>
|
||||
</v-expansion-panel-content>
|
||||
</form-sections>
|
||||
<v-expansion-panel-content v-else>
|
||||
<div slot="header" class="subheading">
|
||||
{{name}}
|
||||
</div>
|
||||
<v-card-text>
|
||||
<slot/>
|
||||
</v-card-text>
|
||||
</v-expansion-panel-content>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import FormSections from '/imports/ui/components/forms/FormSections.vue';
|
||||
export default {
|
||||
components: {
|
||||
FormSections,
|
||||
},
|
||||
props: {
|
||||
name: String,
|
||||
standalone: Boolean,
|
||||
},
|
||||
}
|
||||
export { FormSections };
|
||||
</script>
|
||||
9
app/imports/ui/components/forms/FormSections.vue
Normal file
9
app/imports/ui/components/forms/FormSections.vue
Normal file
@@ -0,0 +1,9 @@
|
||||
<template lang="html">
|
||||
<v-expansion-panel popout expand>
|
||||
<slot/>
|
||||
</v-expansion-panel>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {}
|
||||
</script>
|
||||
@@ -32,6 +32,22 @@ const schemaFormMixin = {
|
||||
}
|
||||
if (ack) ack();
|
||||
},
|
||||
push(modifier, ack){
|
||||
for (let key in modifier){
|
||||
this.model[key].push(modifier[key]);
|
||||
}
|
||||
if (ack) ack();
|
||||
},
|
||||
changeAtIndex(field, index, modifier, ack){
|
||||
for (let key in modifier){
|
||||
this.$set(this.model[field][index], key, modifier[key])
|
||||
}
|
||||
if (ack) ack();
|
||||
},
|
||||
removeAtIndex(field, index, ack){
|
||||
this.model[field].splice(index, 1);
|
||||
if (ack) ack();
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user