This commit is contained in:
2021-01-20 00:32:46 +00:00
parent cc32c335e9
commit 40fadc8180
7 changed files with 53 additions and 36 deletions

View File

@@ -238,8 +238,9 @@ export default {
return template.find(z => z.type != undefined);
},
GetValueForField: function(dataKey) {
if (!this.value) {
return null;
if (this.value == null) {
//return null;
this.value = "{}";
}
//get the data out of the JSON string value
@@ -333,6 +334,9 @@ export default {
SetValueForField: function(dataKey, newValue) {
//Get the current data out of the json string value
//
if (this.value == null) {
this.value = "{}";
}
let cData = JSON.parse(this.value);
if (!window.$gz.util.has(cData, dataKey)) {
cData[dataKey] = null;