This commit is contained in:
2019-11-27 01:06:09 +00:00
parent 5bb3fe12ab
commit a40309f8cb
2 changed files with 14 additions and 11 deletions

View File

@@ -214,11 +214,9 @@ export default {
//get the data out of the JSON string value
var cData = JSON.parse(this.value);
//POtentially, down the road might need to co-erce the value to the right type, this is where that would happen
//get the type it *should* be
//TODO: method here
//coerce it to that type and return it
//TODO: Method here
return cData[dataKey];
},
@@ -236,8 +234,8 @@ export default {
} else {
//then set item in the cData
//TODO: This will likely need also to be converted because dates and stuff
//initial naive attempt: (tostring is suspect)
//POtentially, down the road might need to co-erce the value to the right type, this is where that would happen
cData[dataKey] = newValue.toString();
}
@@ -245,7 +243,7 @@ export default {
var ret = JSON.stringify(cData);
this.$emit("update:value", ret);
//this triggers the onchange routine in the parent form
//mainly for custom fields purposes so that the dirty checking works
//so that the dirty checking works
this.$emit("change", ret);
}
},