mirror of
https://github.com/vform666/variant-form3-vite.git
synced 2024-11-15 00:09:29 +08:00
修复图片、文件上传组件的上传文件类型属性编辑器错误。
This commit is contained in:
parent
78a0e45e9e
commit
be7d23cddf
@ -316,7 +316,9 @@ export default {
|
|||||||
if (!!this.subFormItemFlag) {
|
if (!!this.subFormItemFlag) {
|
||||||
let subFormData = this.formModel[this.subFormName] || [{}]
|
let subFormData = this.formModel[this.subFormName] || [{}]
|
||||||
let subFormDataRow = subFormData[this.subFormRowIndex]
|
let subFormDataRow = subFormData[this.subFormRowIndex]
|
||||||
|
if (!!subFormDataRow) { // 重置表单后subFormDataRow为undefined,应跳过!!
|
||||||
subFormDataRow[this.field.options.name] = value
|
subFormDataRow[this.field.options.name] = value
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.formModel[this.field.options.name] = value
|
this.formModel[this.field.options.name] = value
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import i18n from "@/utils/i18n"
|
import i18n from "@/utils/i18n"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "fileTypes-editor",
|
name: "file-upload-fileTypes-editor",
|
||||||
mixins: [i18n],
|
mixins: [i18n],
|
||||||
props: {
|
props: {
|
||||||
designer: Object,
|
designer: Object,
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
import i18n from "@/utils/i18n"
|
import i18n from "@/utils/i18n"
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "fileTypes-editor",
|
name: "picture-upload-fileTypes-editor",
|
||||||
mixins: [i18n],
|
mixins: [i18n],
|
||||||
props: {
|
props: {
|
||||||
designer: Object,
|
designer: Object,
|
||||||
|
@ -152,6 +152,10 @@ export default {
|
|||||||
subFormModel.splice(0, subFormModel.length)
|
subFormModel.splice(0, subFormModel.length)
|
||||||
this.rowIdData.splice(0, this.rowIdData.length)
|
this.rowIdData.splice(0, this.rowIdData.length)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.widget.options.showBlankRow) {
|
||||||
|
this.addSubFormRow()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -150,6 +150,11 @@
|
|||||||
return this.rowIdData
|
return this.rowIdData
|
||||||
},
|
},
|
||||||
|
|
||||||
|
getWidgetRefOfSubForm(widgetName, rowIndex) {
|
||||||
|
let realWidgetName = widgetName + '@row' + this.rowIdData[rowIndex]
|
||||||
|
return this.getWidgetRef(realWidgetName)
|
||||||
|
},
|
||||||
|
|
||||||
initFieldSchemaData() { //初始化fieldSchemaData!!!
|
initFieldSchemaData() { //初始化fieldSchemaData!!!
|
||||||
if (this.widget.type !== 'sub-form') {
|
if (this.widget.type !== 'sub-form') {
|
||||||
return
|
return
|
||||||
|
@ -540,7 +540,7 @@
|
|||||||
let wNameList = Object.keys(this.widgetRefList)
|
let wNameList = Object.keys(this.widgetRefList)
|
||||||
wNameList.forEach(wName => {
|
wNameList.forEach(wName => {
|
||||||
let foundW = this.getWidgetRef(wName)
|
let foundW = this.getWidgetRef(wName)
|
||||||
if (!!foundW && !!foundW.resetField) {
|
if (!!foundW && !foundW.subFormItemFlag && !!foundW.resetField) { // 跳过子表单字段!!
|
||||||
foundW.resetField()
|
foundW.resetField()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
export const DESIGNER_OPTIONS = {
|
|
||||||
showLanguageMenu: true,
|
|
||||||
showGetSourceURL: true,
|
|
||||||
showGithubURL: true,
|
|
||||||
showDocumentURL: true,
|
|
||||||
showChatGroup: true,
|
|
||||||
//
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
export const VARIANT_FORM_VERSION = '3.0.7'
|
export const VARIANT_FORM_VERSION = '3.0.7'
|
||||||
|
|
||||||
//export const MOCK_CASE_URL = 'https://www.fastmock.site/mock/2de212e0dc4b8e0885fea44ab9f2e1d0/vform/'
|
//export const MOCK_CASE_URL = 'https://www.fastmock.site/mock/2de212e0dc4b8e0885fea44ab9f2e1d0/vform/'
|
||||||
|
Loading…
Reference in New Issue
Block a user