|
@@ -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",
|