Use to-form Vue component instead of base-form in TO builder base template

This commit is contained in:
leigh-mil
2019-09-04 13:26:46 -04:00
parent 23b67ede15
commit 6f1f7f0d3d
3 changed files with 46 additions and 25 deletions

View File

@@ -1,3 +1,6 @@
import stickybits from 'stickybits'
import checkboxinput from '../checkbox_input'
import ClinFields from '../clin_fields'
import DateSelector from '../date_selector'
import FormMixin from '../../mixins/form'
@@ -13,6 +16,7 @@ export default {
mixins: [FormMixin],
components: {
checkboxinput,
ClinFields,
DateSelector,
optionsinput,
@@ -23,9 +27,18 @@ export default {
},
props: {
initialClinCount: Number,
initialObligated: Number,
initialTotal: Number,
initialClinCount: {
type: Number,
default: null,
},
initialObligated: {
type: Number,
default: null,
},
initialTotal: {
type: Number,
default: null,
},
},
data: function() {
@@ -75,4 +88,16 @@ export default {
this.obligated = newObligated
},
},
directives: {
sticky: {
inserted: (el, binding) => {
var customAttributes
if (binding.expression) {
customAttributes = JSON.parse(binding.expression)
}
stickybits(el, customAttributes)
},
},
},
}