mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-01 03:27:52 +00:00
feat: allow custom i18 key
This commit is contained in:
@@ -10,6 +10,10 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
|
translationKey: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
entity: {
|
entity: {
|
||||||
type: Object,
|
type: Object,
|
||||||
required: true,
|
required: true,
|
||||||
@@ -25,7 +29,9 @@ const emit = defineEmits(['deleteSuccess']);
|
|||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const store = useStore();
|
const store = useStore();
|
||||||
const deleteDialogRef = ref(null);
|
const deleteDialogRef = ref(null);
|
||||||
const i18nKey = computed(() => props.type.toUpperCase());
|
const i18nKey = computed(() => {
|
||||||
|
return props.translationKey || props.type.toUpperCase();
|
||||||
|
});
|
||||||
|
|
||||||
const deleteEntity = async payload => {
|
const deleteEntity = async payload => {
|
||||||
if (!payload) return;
|
if (!payload) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user