Browse Source

Merge branch 'bucket' into jenkins

lex 1 year ago
parent
commit
4349375e95
1 changed files with 30 additions and 16 deletions
  1. 30 16
      src/components/VueFormMaking/components/GenerateFormItem.vue

+ 30 - 16
src/components/VueFormMaking/components/GenerateFormItem.vue

@@ -535,26 +535,40 @@ export default {
       deep: true,
       immediate: true,
       handler(newValue) {
-        // console.log(
-        //   newValue,
-        //   "model",
-        //   this.widget.model,
-        //   this.subformIndex,
-        //   JSON.parse(JSON.stringify(this.models))
-        // );
         if (newValue !== undefined && newValue !== null) {
           if (this.subformIndex !== undefined) {
-            // this.models[this.subformModel][this.subformIndex][
-            //   this.widget.model
-            // ] = newValue;
+            const m = JSON.parse(JSON.stringify(this.models));
+            m[this.subformModel][this.subformIndex][this.widget.model] =
+              newValue;
+
+            // console.log(
+            //   newValue,
+            //   "model",
+            //   this.widget.model,
+            //   this.subformModel,
+            //   this.subformIndex,
+            //   JSON.parse(JSON.stringify(this.models)),
+            //   {
+            //     ...this.models,
+            //     [this.subformModel]: this.models[this.subformModel],
+            //   }
+            // );
             this.$emit("update:models", {
-              ...this.models,
-              [this.subformModel]: this.models[this.subformModel],
+              ...m,
+              [this.subformModel]: m[this.subformModel],
             });
-            this.$forceUpdate();
+
+            // this.$forceUpdate();
             // this.$emit('input-change', val, this.widget.model, this.subformIndex)
           } else {
-            // this.models[this.widget.model] = newValue;
+            this.models[this.widget.model] = newValue;
+            // console.log(
+            //   newValue,
+            //   "model",
+            //   this.widget.model,
+            //   this.subformIndex,
+            //   JSON.parse(JSON.stringify(this.models))
+            // );
             this.$emit("update:models", {
               ...this.models,
               [this.widget.model]: newValue,
@@ -569,10 +583,10 @@ export default {
       deep: true,
       immediate: true,
       async handler(val) {
-        // console.log(val, 'show')
+        // console.log(this.models, "show", val.status);
         // console.log(
         //   this.widget,
-        //   "12121",
+        //   val,
         //   this.dataModel,
         //   this.subformIndex,
         //   " subformIndex",