-
-
- {{ displayLabel }}
-
- -
-
- {{ displayText }}
-
+
+ -
+
+ {{ branchLabel }}
+
+ {{ vueAdmin.t(childField.label) }}:
+
+
+
@@ -39,7 +41,6 @@ const props = defineProps<{
modelValue: any
mode: 'display' | 'edit' | 'filter'
disabled?: boolean
- displayLabel?: string
}>()
const emit = defineEmits<{
@@ -48,11 +49,9 @@ const emit = defineEmits<{
const moduleKey = inject('shrimpModuleKey', '')
-const displayText = computed(() => {
- if (!props.modelValue || typeof props.modelValue !== 'object') return '-'
- const type = props.modelValue.type
- const tab = props.field.tabs?.find((t: any) => t.key === type)
- return tab ? vueAdmin.t(tab.label) : String(type)
+const branchLabel = computed(() => {
+ const tab = selectedTab.value
+ return tab ? vueAdmin.t(tab.label) : String(props.modelValue?.type ?? '')
})
const selectedTab = computed(() => {
@@ -105,11 +104,26 @@ onMounted(() => {