Skip to content

Commit

Permalink
Merge pull request #133 from fsg-herbie/main
Browse files Browse the repository at this point in the history
修复3个bug
  • Loading branch information
kanyxmo authored Mar 14, 2024
2 parents c642684 + 378bb02 commit 48829f1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/components/ma-crud/components/form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ const init = () => {
const layout = JSON.parse(JSON.stringify(options?.formOption?.layout ?? []))

columns.value.map(async item => {
await columnItemHandle(item)
if (item.children && item.children.length > 0){
await item.children.map(async (childItem) => {
await columnItemHandle(childItem)
})
}else {
await columnItemHandle(item)
}
})
// 设置表单布局
settingFormLayout(layout)
Expand Down
9 changes: 7 additions & 2 deletions src/components/ma-form/formItem/form-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,12 @@ const getColumnService= inject('getColumnService')
const columns = inject('columns')
const rv = async (ev, value = undefined) => await runEvent(props.component, ev, { formModel, getColumnService, columns }, value)
const index = props.customField ?? props.component.dataIndex
const value = ref(get(formModel.value, index))
//后端传入数字类型导致报错 Invalid prop: type check failed for prop "modelValue". Expected String with value "0", got Number with value 0
const toVal = ref(`${get(formModel.value, index)}`);
const value = ref()
if (toVal.value != 'undefined'){
value.value = toVal.value
}

watch( () => get(formModel.value, index), vl => value.value = vl )
watch( () => value.value, v => {
Expand All @@ -94,4 +99,4 @@ const getComponentName = () => {

rv('onCreated')
onMounted(() => rv('onMounted'))
</script>
</script>
1 change: 1 addition & 0 deletions src/components/ma-upload/components/file-upload.vue
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ const init = async() => {
const result = await getFileUrl(config.returnType, props.modelValue, storageMode)
signFile.value = result.url
currentItem.value.url = result.url
currentItem.value.name = result.origin_name
}
currentItem.value.percent = 100
currentItem.value.status = 'complete'
Expand Down

0 comments on commit 48829f1

Please sign in to comment.