问题工单后台管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
615 B

1 year ago
<template>
<i18n-t tag="span" :keypath="getTitle" scope="global" />
</template>
<script setup lang="ts">
import { type PropType, computed } from 'vue';
import { useLocaleStore } from '@/store/modules/locale';
const props = defineProps({
title: {
type: [String, Object] as PropType<string | Title18n>,
required: true,
default: '',
},
});
const localeStore = useLocaleStore();
const getTitle = computed(() => {
const { title = '' } = props;
if (typeof title === 'object') {
return title?.[localeStore.locale] ?? title;
}
return title;
});
</script>