Skip to content

Commit

Permalink
Merge pull request #187 from tiancheng-66/patch-4
Browse files Browse the repository at this point in the history
Update form-tree-select.vue
  • Loading branch information
kanyxmo authored Jun 21, 2024
2 parents 135488a + 747a2d7 commit 248ae67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/ma-form/formItem/form-tree-select.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ const dictList = inject('dictList')
const rv = async (ev, value = undefined) => await runEvent(props.component, ev, { formModel, getColumnService, columns }, value)
const index = props.customField ?? props.component.dataIndex
const dictIndex = index.match(/^(\w+\.)\d+\./) ? index.match(/^(\w+\.)\d+\./)[1] + props.component.dataIndex : props.component.dataIndex
const value = ref(get(formModel.value, index))
const value = ref(get(formModel.value, index) ?? '')

watch( () => get(formModel.value, index), vl => value.value = vl )
watch( () => value.value, v => {
Expand All @@ -89,4 +89,4 @@ if (props.component.dict && (props.component.dict.name || props.component.dict.d

rv('onCreated')
onMounted(() => rv('onMounted'))
</script>
</script>

0 comments on commit 248ae67

Please sign in to comment.