Explorar o código

修复子表表内模式图片与上传附件组件获取不到数据问题

cyy hai 2 días
pai
achega
5eb8fb0196

+ 2 - 2
src/business/platform/form/formrender/dynamic-form/dynamic-form-table-item.vue

@@ -136,8 +136,8 @@ export default {
                 if (FormOptions.t.NON_MODEL_FIELD_TYPES.includes(this.field.field_type)) {
                     return
                 }
-                /* 如果是选择器或值来源类型, 需从监控方法进行更新数据*/
-                if (this.field.field_type === 'selector' || this.field.field_type === 'select' || this.field.field_type === 'customDialog' || this.field.field_type === 'linkdata') {
+                /* 选择器、值来源、附件、图片等仅通过 v-model(input) 更新,不会触发 change 事件,需主动同步子表数据 */
+                if (['selector', 'select', 'customDialog', 'linkdata', 'attachment', 'image'].includes(this.field.field_type)) {
                     this.handleModels(this.field.name, val)
                 }
                 this.$nextTick(() => {