Closed HuangKaiSong closed 7 months ago
You can the below:
<template>
<custom />
</template>
<script setup lang="ts">
import { defineComponent, h } from 'vue';
import { Translation as I18nT } from 'vue-i18n';
const Custom = defineComponent({
name: 'Custom',
render() {
return h(I18nT, { keypath: 'message', scope: 'global' }, [{
status: () => h('strong', null, () => 'disable'), // status,
title: () => h('strong', { style: 'color:var(--el-color-primary)' }, () => 'xiaoming'), // title
}]);
},
});
</script>
references:
Thanks!
Reporting a bug?
How to pass using named interpolation?
Here's an example:
The Named interpolation:
Expected behavior
value can be passed
Reproduction
https://stackblitz.com/edit/vitejs-vite-93fknb?file=src%2FApp.vue
System Info
Screenshot
No response
Additional context
No response
Validations